on 02-21-2023 12:57 AM
Why is package-lock.json missing? I have setup a free account on SAP BTP trial for the tutorials. Everything checks out until I get to the step in the Exercise. Do I need to have free tier service instead?
npm ci command fails with the following error:
36 verbose stack The `npm ci` command can only install with an existing package-lock.json or
36 verbose stack npm-shrinkwrap.json with lockfileVersion >= 1. Run an install with npm@5 or
36 verbose stack later to generate a package-lock.json file, then try again.
36 verbose stack
Hi @dhrubajyoti @Jarmo_Tuominen ,
unfortunately I cannot reproduce the issue. I have adjusted the instructions, can you try to execute these adjusted instructions?
remove package-lock.json file from your project
registry=https://registry.npmjs.com/
I took inspiration from the following question in the community https://answers.sap.com/questions/13544661/how-to-avoid-changes-in-package-lockjson-when-usin.html , but unfortunately as said cannot reproduce the issue myself.
Thanks and best regards,
Jannes
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I may be wrong but the URL ( http://nginx-redirector.repo-cache.svc.cluster.local/repository/appstudio-npm-group/) may be causing this. this may be locally accessible from SAP network but not from outside. This is just a vague thought. I tried opening this link and it says that it is not reachable. this URL is generated in package-lock.json file.
i tried command- "npm help config" result --- npm ERR! code ENOENT npm ERR! syscall spawn man npm ERR! path man npm ERR! errno -2 npm ERR! enoent spawn man ENOENT npm ERR! enoent This is related to npm not being able to find a file. npm ERR! enoent npm ERR! A complete log of this run can be found in: npm ERR! /home/user/.npm/_logs/2022-03-30T16_44_12_569Z-debug-0.log
Hi @Tiwari,
thanks for your efforts and for keeping us informed. Could you please try to run command
npm ci
instead of the npm i or npm install? npm ci is doing a clean install of all dependencies, e.g. removing all existing node modules before installing them again.
Best regards,
Jannes
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.