Skip to main content
The 2024 Developer Survey results are live! See the results

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

2
  • This doesn't seem to work. npm install just spins forever. If I specify a directory that does exist (like the path to another actually-installed dep), there is an error that the resolved dep does not match the required one.
    – Coderer
    Commented Jun 24 at 19:07
  • This strategy doesn't work properly (at least with newer npm versions). If you try to run npm i a second time without deleting package-lock.json I get the error npm error Cannot destructure property 'package' of 'node.target' as it is null., which is nasty. I'm testing the other suggested strategy but this should really be a RFE to NodeJs so it doesn't accidentally break in the future.
    – ceztko
    Commented Jun 28 at 10:07