[BUG] npm install cannot update the lock file
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 10.1k
- Forks
- 4.7k
- Avg merge
- 2d 2h
- Merged PRs (30d)
- 19
Description
Is there an existing issue for this?
- I have searched the existing issues
This issue exists in the latest npm version
- I am using the latest npm
Current Behavior
Hi,
We are trying to upgrade some libraries, using the renovate bot:
but when the npm install command is executed, it fails to update the package-lock.json file.
We get the following error:
If I manually delete the package-lock.json file and node_modules folder, and then run the npm install command, it works:
Any ideas why it fails?
Expected Behavior
No response
Steps To Reproduce
No response
Environment
- npm: 10.2.5
- Node.js: 20.10.0
- OS Name: Mac OS & Linux & Windows
- npm config:
save-exact = true
save-prefix = ""
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the reported npm 10.2.5 and Node.js 20.10.0 environment, including the save-exact and save-prefix settings, and reproduce the Renovate-triggered npm install failure. Compare behavior with package-lock.json and node_modules present versus after deleting them; done means npm install updates package-lock.json without requiring either deletion.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, node.js
- Domain
- cli
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100