cancel
Showing results for 
Search instead for 
Did you mean: 

The command "npm update --package-lock-only" fails with unresolved dependency

Amey-Mogare
Contributor
0 Kudos

Hello All,

I am creating a sample CAPM Application by following the learning journey Building side-by-side extensions on SAP BTP.

At the the step "Exercise: Preparing the Application for Deployment", I am preparing application for manual deployment. However, the command "npm update --package-lock-only" gives following error.

Any ideas or suggestions to fix this are welcome.

Warm regards,

Amey

------

'Log files:
/home/user/.npm/_logs/2024-05-17T14_05_38_019Z-debug-0.log

# npm resolution error report

While resolving: risk-management@3.0.0
Found: @Sap/cds@7.2.0
node_modules/@sap/cds
@Sap/cds@"7.2.0" from the root project

Could not resolve dependency:
peer @Sap/cds@">=7.6" from @cap-js/sqlite@1.7.1
node_modules/@cap-js/sqlite
dev @cap-js/sqlite@"^1" from the root project

Fix the upstream dependency conflict, or retry
this command with --force or --legacy-peer-deps
to accept an incorrect (and potentially broken) dependency resolution.

View Entire Topic
RaviL
Associate
Associate

 

 

Hello Amey,

Please update the package.json to latest cds/cds-dk with can be found as shown below and lock your package. 

RaviL_0-1716649514420.png

 

 

 

Regards

Ravi

Amey-Mogare
Contributor
0 Kudos

Hello Ravi,

Thank you for the hint! It worked. Now I am able to built the application! 

Is there any way to automatically update all such dependencies before or while building? It would be greatly efficient to have this.