cancel
Showing results for 
Search instead for 
Did you mean: 

Building of CAP project fails (npm registry sap/cds-dk)

DanielSchneider
Explorer
0 Kudos

Hi,

I wanted to re-build a successfully deployed cap project (after implementing small adjustments) but it fails now.

I'm using an mta.yaml file. Before I can deploy it, I have to build it: building fails.

To me it seems that SAP is currently adding/changing dependencies in the cds package.

I get the following error:

INFO executing the "npx -p @sap/cds-dk cds build --production" command...
........npm ERR! code E404
npm ERR! 404 Not Found - GET http://nginx-redirector.repo-cache.svc.cluster.local/repository/appstudio-npm-group/@sap/cds/-/cds-5...
npm ERR! 404 
npm ERR! 404  '@sap/cds@5.3.0' is not in the npm registry.
npm ERR! 404 You should bug the author to publish it (or use the name yourself!)
npm ERR! 404 It was specified as a dependency of '@sap/cds-dk'
npm ERR! 404 
npm ERR! 404 Note that you can also install from a
npm ERR! 404 tarball, folder, http url, or git url.

Yesterday I got an error for a missing lint package, also noted as a dependency of sap/cds-dk. Since today that seems no problem anymore but now there is a different package missing, I'm concluding that SAP is currently working on dependencies of sap/cds-dk.

Can you please confirm and if I'm correct, when do you think everything will be 'buildable' again?

Thank you in advance

Daniel

View Entire Topic
Uwe_Klinger
Advisor
Advisor
0 Kudos

Hi Daniel,

Sorry, I needed to revise my answer after I saw that you use BAS.

"npx" always downloads the newest version. And new versions have just been released. At least that explains what have changed. But as said, for me it works both local and on BAS in the EU trial landscape (hanatrial.ondemand.com), which should be the same as EU10.

Looks like BAS' npm proxy doesn't resolve it for whatever reason.

Please open a ticket if the issue persists.

Maybe you can try a:

npm cache clean --force

Or go with the pre-installed @sap/cds-dk version (call without the npx) until the issue is resolved.

Best regards,

Uwe

DanielSchneider
Explorer
0 Kudos

Hi Uwe,

npm cache clean --force

unfortunately didn't help.

I'm not sure about calling it without 'npx': I actually just right click on the mta.yaml and choose 'Build MTA Project' - I guess everything else is then done automatically.

Since the change is not that urgent, I will wait a few days and open a ticket if the issue persists.

Thanks again for your quick replies!

Have a nice day & BR

Daniel

MohamedAharchi
Explorer

Using the pre-installed @sap/cds-dk version works for me!

dlwbolintoa
Discoverer
0 Kudos

Hi,

For anyone encountering this issue and needs a quick workaround, change the following line from mta.yaml, under commands of build-parameters:

- npx -p @sap/cds-dk cds build --production

To use the node_modules directory installed in your project:

- node_modules/@sap/cds-dk/bin/cds.js build --production
dlwbolintoa
Discoverer
0 Kudos

It seems this has already been fixed, no need for the workaround. Please see Boris' answer.