From e77cb179f600279d157550974f87c6e27a929788 Mon Sep 17 00:00:00 2001 From: "Ya-wen, Jeng" Date: Fri, 5 Apr 2024 12:08:21 +0800 Subject: [PATCH] fix: fix npm_install script if there is no package.json --- scripts/cli/prepare.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/cli/prepare.sh b/scripts/cli/prepare.sh index f5c885d7..a964825b 100755 --- a/scripts/cli/prepare.sh +++ b/scripts/cli/prepare.sh @@ -82,7 +82,7 @@ read_toml() { # Install npm dependencies npm_install() { - if [[ ! -d "${CIRCUIT_DIR}/node_modules" ]]; then + if [[ -f "${CIRCUIT_DIR}/package.json" && ! -d "${CIRCUIT_DIR}/node_modules" ]]; then echo "Installing npm dependencies for $CIRCUIT_DIR..." (cd $CIRCUIT_DIR && npm install) fi