cancel
Showing results for 
Search instead for 
Did you mean: 

How to deploy Typescript CAPM CDS v7 in CICD?

AdrianDBorja
Explorer
0 Kudos

In my package.json, @sap/cds is change to ^7, npm install carried out and local build has no error.

But when deploying the package thru CICD, it fails at build step saying "cds: not found".

In mta.yaml, we have indicated as before build to execute "cds build" since we have written our CAPM in Typescript, but when building, it says "cds: not found". Any one got any ideas or encountered this and able to figure out?

Thanks!

Accepted Solutions (1)

Accepted Solutions (1)

prisha500
Explorer
0 Kudos

Your CI/CD environment can't find the cds command because it's likely installed locally. To fix:

  • Use npx with the cds command in mta.yaml: npx cds build.
  • Or, directly reference the path: ./node_modules/.bin/cds build.
  • Ensure your CI/CD uses the correct Node.js version supported by @sap/cds.
  • Optionally, install @sap/cds globally in your CI/CD pipeline: npm install -g @sap/cds.
  • Verify with logging commands like pwd, npm list, and echo $PATH.
AdrianDBorja
Explorer
0 Kudos

thanks! this worked, specifically, added into the build parameters as a before build step to run: npm install -g @sap/cds

prior to the command that requires to run script with cds

Answers (0)