-
Notifications
You must be signed in to change notification settings - Fork 76
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
Investigate package-lock integrity issue #589
Comments
Some more popular npm issues about this: npm/cli#4263 npm/cli#4460 |
After #590, packages with keys like |
After talking this over, I'm not sure what we can really do for this issue. It seems manual regeneration doesn't completely fix the problem based on the comment above. In addition we're a bit hesitant to add in the I definitely sympathize, though. I'm not very versed in Nix or its ecosystem. Can you help me to understand why the Nix pkg process needs those fields? From the linked issue, it seems like this affects caching somehow? I'm curious why other Nix pkgs don't have this same issue? For example, Prettier has a package listed, but the Prettier repo doesn't seem to have a package-lock at all. Is this because it falls back to the The Nix issue has a comment that seems to imply there's an escape hatch in case someone really wants to generate an empty cache, but the PR doesn't seem to mention it. Is there anyway to forego the caching at least until this npm issue is addressed? |
Nix builds packages in a declarative & fully reproducible way. That's why it needs to know the exact versions of all dependencies with their hashes. There seems to be some work in nixpkgs to simplify working with incomplete/broken lock files, though: |
Prettier in nixpkgs is currently packaged in a different way that essentially downloads the prebuilt distributable from npm directly instead of doing a build from source. So, for nixpkgs specifically, we can work around this issue by copying the |
Yeah I understand. It's good that there's some movement in nixpkgs for helping with this issue. It's a shame that the lock file is so non-deterministic like that. I am going to close this issue as there's nothing really for us to do here since this is an upstream bug. But if there's anything else on our side that could be addressed, let me know. |
#750 will avoid removing the hash fields during a version bump. It's not a guarantee that we'll always have them, but it should help. |
For full context, see #526
The package-lock file seems to be missing
resolved
andintegrity
fields after installs in some instances. There is an open issue here with more context: npm/cli#6301The recommendation is to delete
node_modules
andpackage-lock
and rerun the install, which is a fragile process.This PR is to track an investigation into whether we can implement a more permanent fix for this. Note the underlying cause is an issue with npm so we can't completely fix this, but we can at least harden our process to make sure these fields don't get removed.
The text was updated successfully, but these errors were encountered: