Skip to content

Fix invalid package-lock.json entries#545

Merged
Sean-Der merged 2 commits into
Glimesh:mainfrom
magneticflux-:lockfile-fixes
Apr 20, 2026
Merged

Fix invalid package-lock.json entries#545
Sean-Der merged 2 commits into
Glimesh:mainfrom
magneticflux-:lockfile-fixes

Conversation

@magneticflux-

Copy link
Copy Markdown
Contributor

Because of an NPM bug, package-lock.json files can randomly become corrupted and lack resolved URL and integrity hash fields. The normal npm install silently ignores the problem, but I ran into it because I am working on updating this package in NixOS/nixpkgs and the Nix builder requires all NPM dependencies to be pre-downloaded and verified by hash.

The relevant issues are linked in the first commit.

After that, I moved the Babel plugin to its new name to silence a warning.

No package version specs were changed, but there were some minor updates. There's not an easy way to regenerate the lockfile while preserving the exact versions because the NPM issue appears to be with the specific versions being resolved and it fails to write these specific fields every time.

…date versions

There's not an easy way to regenerate the lockfile while preserving the exact versions because the NPM issue appears to be with version resolution. This particular set of versions randomly caused the issue ¯\_(ツ)_/¯

This is caused by npm/cli#6301 and was caught by NixOS/nixpkgs#479805
@magneticflux-

Copy link
Copy Markdown
Contributor Author

My PR to nixpkgs updates the package and adjusts the module for the new changes (now that #526 is in). I'll finish and send it tomorrow, so @sleroq if you're using a similar module privately or have any other feedback I'd love to hear then!

@Sean-Der

Copy link
Copy Markdown
Collaborator

Thank you @magneticflux-!

@Sean-Der Sean-Der merged commit da6fba9 into Glimesh:main Apr 20, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants