-
Notifications
You must be signed in to change notification settings - Fork 8
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
Missing "resolved" and "integrity" from lock file #59
Comments
Hi! I would be fine with regenerating package-lock.json. But before we do that: Next time I update or change dependencies, how do I verify that I don’t re-introduce this issue? There must be some bug in npm causing it because I never touch package-lock.json by hand. |
Good question. I'm not entirely sure of a way that doesn't involve trying to build something with nix. It seems like the issue occurs when trying to install a package that already exists in I will see if I can write a script that can "fix" a lock file. I really don't like the solution of having to delete the lock file - it seems to defeat the whole purpose of a lock file! |
I have made a python script that adds the missing fields into a This will allow the lock file to be updated without being deleted. You don't have to integrate this into your workflow if you don't want to. I'm also happy to use this code to generate a patch file for my flake wrapper |
Okay, I improved the packaging of the python script. It should be usable with |
I'm happy to close this issue, since it isn't really an issue for normal elm-watch usage. |
Thank you for this cool project! To make elm-watch easier to use on nix based systems, I have been trying to package this project as a nix flake. While doing that, I noticed that a lot of the dependencies listed in the
packages
value inpackage-lock.json
are missing their resolved and integrity information. For example, yallist and ansi-styles. I have tried adding in these fields but it seems like there are too many missing to be able to do this by hand.This issue of missing hashes isn't specific to elm-watch - it seems several other npm packages suffer from this issue.
The only way I could add these fields back in was to remove
package-lock.json
(and my localnode_modules
directory) and runnpm install
. While this does fix the missing fields, it also updates every package to the latest one, meaning my nix flake version of elm-watch isn't identical to the one you provide.What are your thoughts about adding in the missing resolved and integrity fields, either by regenerating
package-lock.json
or another method?The text was updated successfully, but these errors were encountered: