Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] npm install or npm update sometimes trashes lockfile, setting resolved: false #1138

Closed
taylorjdawson opened this issue Apr 10, 2020 · 3 comments
Labels
Bug thing that needs fixing

Comments

@taylorjdawson
Copy link

taylorjdawson commented Apr 10, 2020

Note: I am porting this issue over from the now archived npm.community with the hopes that this issue can get escalated and resolved as it looks like it has been largely overlooked up to this point. Maybe this issue can be set to resolved: true 😉


What / Why

  • My package-lock.json constantly toggles between:
 "resolved": "https://registry.npmjs.org/tar/-/tar-4.4.1.tgz",
  "resolved": false,

When

  • n/a

Where

  • n/a

How

Current Behavior

  • Running npm install or npm update sometimes trashes the lockfile, setting resolved: false for a number of packages.

Steps to Reproduce

  • Run npm install or npm update
  • Check package-lock.json for changes

Expected Behavior

  • resolve does not switch between false and the URL.

Who

  • n/a

References

@aduth
Copy link

aduth commented May 5, 2020

We've been encountering this quite frequently in WordPress/gutenberg lately.

Some possibly relevant additional details:

  • The packages which fluctuate are often "optional": true, or transitive dependencies of an "optional": true (e.g. nopt, node-pre-gyp, fsevents).
  • Our project is structured as a monorepository, with many dependencies in package.json defined as local filesystem dependencies.

@jzaefferer
Copy link

For anyone else encountering this problem: rm -rf node_modules/ && npm cache clean --force && npm install helped in my case.

@darcyclarke darcyclarke added the Bug thing that needs fixing label Oct 30, 2020
@darcyclarke
Copy link
Contributor

npm v6 is no longer in active development; We will continue to push security releases to v6 at our team's discretion as-per our Support Policy.

If your bug is preproducible on v7, please re-file this issue using our new issue template.

If your issue was a feature request, please consider opening a new RRFC or RFC. If your issue was a question or other idea that was not CLI-specific, consider opening a discussion on our feedback repo

Closing: This is an automated message.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug thing that needs fixing
Projects
None yet
Development

No branches or pull requests

4 participants