-
-
Notifications
You must be signed in to change notification settings - Fork 15k
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
yarn package pins nodes 8 and ignores node 10 installed via default.nix #53820
Comments
you need to override the nodejs version used by yarn https://nixos.org/nixos/nix-pills/nixpkgs-overriding-packages.html --- i/shell.nix
+++ w/shell.nix
@@ -3,7 +3,7 @@ stdenv.mkDerivation rec {
name = "env";
env = buildEnv { name = name; paths = buildInputs; };
buildInputs = [
- yarn
+ (yarn.override { nodejs = nodejs-10_x; })
nodejs-10_x
];
} |
Thanks @marsam, that did the job! Looks like there's some good stuff in nix-pills that's not immediately apparent from the main docs. |
For anyone else using |
For anyone else who usese @jaredramirez's trick, it is broken after this change: 4369da1:
The fix I'm using is to also override
|
Issue description
Beware, new nix user here so this may be entirely my fault. Apparently, the "yarn" package gets its own nodes version and ignores the nodejs version configured in the default.nix file.
I have tried finding docs on how to control a possible "indirect" dependency but couldn't figure this out.
Steps to reproduce
I have this
default.nix
fileRunning yarn however for a package.json that restricts
results in an error.
Technical details
Please run
nix-shell -p nix-info --run "nix-info -m"
and paste theresults.
The text was updated successfully, but these errors were encountered: