-
-
Notifications
You must be signed in to change notification settings - Fork 14.8k
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
Packages from nodePackages_latest
don't result in executables in $PATH.
#145432
Comments
I've also attempted this with a more bleeding edge version of nixpkgs and it still appears to be an issue. |
This seems to be a node2nix issue. Cc @svanderburg. |
node2nix only supports node_16 on master, the version included in nixpkgs does not support it. |
node2nix |
confirm it |
Yes node2nix master has this issue: svanderburg/node2nix#293. However I'm not sure if this has anything to do with the OP's problem. This is because nixpkgs master isn't even using 1.10.0 or 1.11.0: svanderburg/node2nix#291 (comment) It claims it's on 1.10.0, but the actual executable is still 1.9.0 when you check the version. |
@CMCDragonkai I suspect your test on 1.9.0 was tainted by the fact that 1.9.0 did not support |
I'm not sure what OP's problem actually is because I'm not sure what the current nixpkg's master node packages are built with. As I said, the master claims that it has 1.10.0, but that package is actually 1.9.0. And there was a PR to update all of the node packages but that isn't even merged. My experiments show that a combination of behaviour changes with While we wait on upstream to figure it out, I've ended up with duct-tape solution using |
@CMCDragonkai I’m sure. nixpkgs/pkgs/development/node-packages/default.nix Lines 251 to 294 in 87d34a6
It is easy to verify that 1.9.0 is equally affected without relying on nixpkgs: $ echo `["yarn"]` > node-packages.json
$ npx [email protected] --version
Need to install the following packages:
[email protected]
Ok to proceed? (y) y
node2nix 1.9.0
$ npx [email protected] --pkg-name nodejs-16_x --input node-packages.json
info attempt registry request try #1 at 12:10:57 PM
http request GET https://registry.npmjs.org/yarn
http 200 https://registry.npmjs.org/yarn
$ nix-build -A yarn
…
$ ls result/
lib
$ npx [email protected] --pkg-name nodejs-14_x --input node-packages.json
info attempt registry request try #1 at 12:14:27 PM
http request GET https://registry.npmjs.org/yarn
http 200 https://registry.npmjs.org/yarn
$ nix-build -A yarn
…
$ ls result/
bin lib
Same results with 1.9.0, 1.10.0, and 1.11.0. It really is a difference between In nixpkgs, it’s the difference between |
This should be fixed by #193337, if anyone would like to test ( |
I can confirm this is fixed, I no longer need to create symlinks manually for node packages, thank you very much to the devs who fixed this! |
Describe the bug
A shell including packages from
nodePackages_latest
likeyarn
orpnpm
don't result in executables on the path the waynodePackages
does.Steps To Reproduce
Steps to reproduce the behavior:
nix-shell -p nodePackages_latest.yarn --run "yarn --version"
Expected behavior
I would expect to see the version number of yarn instead of
/tmp/nix-shell-433770-0/rc: line 1: yarn: command not found
.Additional context
This works find if
nix-shell -p nodePackages.yarn --run "yarn --version"
is run instead.I stumbled on this earlier but I'm not entirely certain if it's related: #142915
Notify maintainers
Apologies @marsam if you're not the most appropriate person to pull into this!
Metadata
Maintainer information:
The text was updated successfully, but these errors were encountered: