-
Notifications
You must be signed in to change notification settings - Fork 84
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
package-lock.json
missing resolved
& integrity
fields
#719
Comments
@felschr, I'm not entirely sure what commands @smaye81 ran, but my guess is that the fields were removed from the lock If you run the following commands: $ npm --version
9.8.0
$ rm -rf package-lock.json
$ npm install The lock-file is re-created, and all I think it might not be completely uncommon to have lock files without those fields in the wild because of this behavior of npm... Do you know an alternative in situations like this that retains the fields? |
Just to confirm -- I used npm version |
Regenerating the lockfile should be adding those fields, not removing them. I just confirmed that locally with npm 9.7.2 -- removing the lockfile and doing Can you share the output of |
Oh there's an upstream issue for it. You might have to remove both |
I just created #720 to regenerate package-lock.json using the instructions in npm/cli#6301. Let me know if this is what is needed to satisfy the nixpkgs issue. Also please note that we can't guarantee this won't happen again due to the open npm cli issue. We aren't committing to manually ensuring the lock file always has these properties. Hopefully the issue on the npm side is resolved soon. |
Also related fix in Protobuf-ES: bufbuild/protobuf-es#527 |
@smaye81 Thank you for the quick fix and the new release of |
npm issues that track the problem of missing Issue on |
rm package-lock.json. Then regenerate package-lock.json using the yocto version of npm, nodejs_20.11.1. [1] devtool modify -n webui-vue <local webui-vue repo> Then did a build. This adds the integrity / resolved. It is based on a connectrpc issue[2]. Prefer this solution over 71971[3] due to this using standard NPM. [1]: https://github.com/openbmc/openbmc/blob/master/meta-openembedded/meta-oe/recipes-devtools/nodejs/nodejs_20.11.1.bb [2]: connectrpc/connect-es#719 (comment) [3]: https://gerrit.openbmc.org/c/openbmc/webui-vue/+/71971 Tested: A quick sanity test on the GUI works. Change-Id: I13c098a7d07b2b8fdf3d82c2eaad3f35167757ae Signed-off-by: Gunnar Mills <[email protected]>
Hi, while trying to package
protoc-gen-connect-es
for nixpkgs, I've ran into the issue that thepackage-lock.json
doesn't contain anyresolved
&integrity
fields since 411bba5: NixOS/nixpkgs#243432 (comment)These fieldd should exist according to the docs: https://docs.npmjs.com/cli/v9/configuring-npm/package-lock-json
This can likely be fixed by regenerating the lock file from scratch and/or updating to newer versions of npm.
I've also found the same issue with protobuf-es: bufbuild/protobuf-es#526
The text was updated successfully, but these errors were encountered: