-
Notifications
You must be signed in to change notification settings - Fork 604
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
[rush] incorrect Node.js version detection #3613
Comments
How is Rush installed globally? What is the contents of the file at the path that gets printed when you run My suspicion is that the bin script for Rush is pointing at a different version of Node. |
Rush is globally installed via |
I'm also getting this. In my case, I used devbox to create a development shell which specifies node and rush to be globally installed in the shell. Devbox is also a nix shell, so I believe my issue is the same as this one. In my config for devbox, I initially specified the latest version of node, but it was not compatible, so I re-created the shell with older version of node, but it's still pointing to the wrong node version. @gomain Did you figure out how to fix this? |
@iclanton When I do
When I see the content of the file, I see this.
Running |
Rush just uses whichever version of Node it was Invoked with, so if it's getting an unexpected version, I'd guess it's because either the package manager that installed it generated an incorrect bin file, or it was installed with under a different version of node in a location that's available to all versions of node. Given that this seems to be happening on/with nix, I bet nix doesn't isolate globally installed packages from between node versions. I'd consider this a flaw with nix, since packages that have native bindings often need those bindings to match a specific version of Node. You should be able to mitigate this by reinstalling Rush globally. |
nix ensures runtime dependencies. executable node packages (such as rush) executables aren't plain scripts run by the node available at the shell, but a node specified by its derivative. this is particularly true when derivatives were generated via node2nix. you could install rush without installing node and it will still run. this is not a bug. you need tobe explicit of what you want. |
Summary
Any rush command fails, because of node.js version validation.
Repro steps
Using Nixos:
Details
Rush is not detecting nodejs verison by actually running
node --version
.Standard questions
Please answer these questions to help us investigate your issue more quickly:
@microsoft/rush
globally installed version?rushVersion
from rush.json?useWorkspaces
from rush.json?node -v
)?The text was updated successfully, but these errors were encountered: