From f45f8a5308a690c10b5e09a9f6b536ab5e06de60 Mon Sep 17 00:00:00 2001 From: Luke Cartey Date: Mon, 2 Dec 2024 11:43:38 +0000 Subject: [PATCH] npm install in each package.json This is because cds dependencies can exist in the package.json that may need to be installed before running the cds compiler --- extractors/cds/tools/index-files.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/extractors/cds/tools/index-files.sh b/extractors/cds/tools/index-files.sh index 8fb60461a..ea3e6c842 100755 --- a/extractors/cds/tools/index-files.sh +++ b/extractors/cds/tools/index-files.sh @@ -36,7 +36,7 @@ then # directory. # # We also ensure we skip node_modules, as we can end up in a recursive loop - find . -type d -name node_modules -prune -false -o -type f \( -iname 'package.json' \) -exec grep -ql '@sap/cds' {} \; -execdir bash -c "grep -q \"^\$(pwd)\(/\|$\)\" \"$response_file\"" \; -execdir bash -c "echo \"Installing @sap/cds-dk into \$(pwd) to enable CDS compilation.\"" \; -execdir npm install --silent @sap/cds-dk \; + find . -type d -name node_modules -prune -false -o -type f \( -iname 'package.json' \) -exec grep -ql '@sap/cds' {} \; -execdir bash -c "grep -q \"^\$(pwd)\(/\|$\)\" \"$response_file\"" \; -execdir bash -c "echo \"Installing @sap/cds-dk into \$(pwd) to enable CDS compilation.\"" \; -execdir npm install --silent @sap/cds-dk \; -execdir npm install --silent \; # Use the npx command to dynamically install the cds development kit (@sap/cds-dk) package if necessary, # which then provides the cds command line tool in directories which are not covered by the package.json