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

npmlock2nix fails when a "resolved" field is false in package-lock.json #116

Open
tshaynik opened this issue Oct 7, 2021 · 0 comments
Open

Comments

@tshaynik
Copy link
Contributor

tshaynik commented Oct 7, 2021

Sometimes, due to a known issue in npm (npm/npm#20106 (comment)), a package-lock.json can be generated where some of the "resolved" fields are false. Running an npmlock2nix on such a package produces an error, as the boolean value false is passed to fetchurl:

error: `url` is not a string

The current workaround is to regenerate the package-lock.json file, using:

rm -rf node_modules
npm cache clean --force
npm install

But I think that npmlock2nix should be able to safely ignore those unresolved dependencies and still run. If that doesn't work, then I think it should fail with a clearer error message.

I'd be happy to try and work on a solution for this. Big thanks to @happysalada for helping me understand this issue!

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

No branches or pull requests

1 participant