-
-
Notifications
You must be signed in to change notification settings - Fork 45
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.node_modules started failing to populate artifacts #140
Comments
Experiencing the same. |
Includes a workaround for an npmlock2nix issue nix-community/npmlock2nix#140
Apparently the dependencies now appear twice in the package-lock.json, and npm is reading the former one who isn't getting patched: {
"name": "my-project",
"lockfileVersion": 2,
"requires": true,
"packages": {
"": {
"name": "my-project",
"dependencies": {
"@ampproject/remapping": "^2.0.3",
},
"devDependencies": { }
},
"node_modules/@ampproject/remapping": {
"version": "2.0.3",
"resolved": "https://registry.npmjs.org/@ampproject/remapping/-/remapping-2.0.3.tgz",
"integrity": "sha512-DmIAguV77yFP0MGVFWknCMgSLAtsLR3VlRTteR6xgMpIfYtwaZuMvjGv5YlpiqN7S/5q87DHyuIx8oa15kiyag==",
"peer": true,
"dependencies": {
"@jridgewell/sourcemap-codec": "^1.4.9",
"@jridgewell/trace-mapping": "^0.2.7"
},
"engines": {
"node": ">=6.0.0"
}
}
},
"dependencies": {
"@ampproject/remapping": {
"version": "2.0.3",
"resolved": "https://registry.npmjs.org/@ampproject/remapping/-/remapping-2.0.3.tgz",
"integrity": "sha512-DmIAguV77yFP0MGVFWknCMgSLAtsLR3VlRTteR6xgMpIfYtwaZuMvjGv5YlpiqN7S/5q87DHyuIx8oa15kiyag==",
"peer": true,
"requires": {
"@jridgewell/sourcemap-codec": "^1.4.9",
"@jridgewell/trace-mapping": "^0.2.7"
}
}
}
} |
So, whats the plan. I can't use node 14 and node 16 is broken. Should I ditch npmlock2nix and try the next thing ? |
"the plan" is to find time/motivation/someone to dive into the issue with npm16. We need to find the differences in the lock files and figure out a way to do our shebang patching just like before. |
I think the fact that your dependencies are marked as
|
Can this be closed, sor the same reasons as #153 (comment)? |
A bump of nixpkgs, most likely the bump of
nodejs
from 14.x to 16.x (4c60ee3da1e) started causingnpmlock2nix.node_modules
to fail to populate the sources specified inpackage-lock.json
.https://nodesource.com/blog/whats-new-in-npm-8 mentions there's a new lockfile format, and npm seems to do a "one-time fixup" of the old lockfile.
This fails in the sandbox, as it obviously can't write back to that file.
If I invoke a
npm install
outside of the sandbox, it mentions fetching more metadata:With the updated npm-lock.json, I then run the build again, and it fails to discover the provided tarballs:
As of now, I was able to workaround this by passing
nodejs = nodejs-14_x;
in the call tonpmlock2nix.node_modules
.The text was updated successfully, but these errors were encountered: