cancel
Showing results for 
Search instead for 
Did you mean: 

Error while deploying my CAP Project to CF Trial account

Chandan
Advisor
Advisor

Hey all,

I am getting the below errors while deploying my CAP application to Cloud Foundry trial account.

in the service log Error - cds: not found

And in the db deployer:

Error : new major version of npm available

Below is my package.json

I am using VS Code where I have 9.6.7 npm version and 18.17.1 node version installed. Is it something related to my installed node and npm versions?

Accepted Solutions (1)

Accepted Solutions (1)

Chandan
Advisor
Advisor

Hi All,

Deployment success! After many attempts, I was finally able to deploy. 😄

Many thanks to Mauricio Lauffer for his amazing blog which helped me resolve this issue.

Tips for running CAP nodejs in SAP BTP | SAP Blogs

I have updated my start script in package.json to

// package.json
"scripts": {
  "start": "cds-serve"
}

Then updated the command in mta.yaml to start the application.

commands:
        - npm install --production
        - npx -p @sap/cds-dk cds build --production

Done. Then it worked.

Answers (2)

Answers (2)

WouterLemaire
Active Contributor

You need to increase the version of nodejs in the package.json file to 16.20 or 16.x. I don’t think 16.15 is still supported. You can find up to date info here https://me.sap.com/notes/0003371197

Chandan
Advisor
Advisor
0 Kudos

Thanks a lot @Wouter Lemaire for your prompt response.

I changed my package.json as below. But still see the same error.

"engines": {

"npm" : ">=8.0.0 <9.0.0",

"node" : ">=16.0.0 <17.0.0" }

Could anyone suggest why this error?

buz
Explorer
0 Kudos

Hi all,

the same happened to me, this is the deployment's log:

Thank you

Chandan
Advisor
Advisor
0 Kudos

Hello Andrea,

Please check the answer which I submitted now. Hope it helps.

Regards,

Chandan