-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
[Bug?]: Yarn doesn't use Node found first in PATH #4658
Comments
This comment was marked as outdated.
This comment was marked as outdated.
To quote the documentation for
|
That seems to contradict the results I'm seeing. From my second and third commands: $ yarn node --version
v16.13.0
$ node --version
v18.6.0 |
You'll have to debug your system to figure out why |
I'm afraid I still don't understand. |
Hello! Could we reopen this issue? I don't feel like my original question has been addressed. It seems to defy logic that the following two conditions could be simultaneous true:
|
Not necessarily, have you tried running
I don't see anything actionable to justify reopening, the node binary used to spawn Yarn is out of our control. I tried the provided reproduction the last time I commented on this issue and again now, it fails on $ corepack enable
bash: corepack: command not found If I follow volta-cli/volta#987 (comment) it passes as expected |
Self-service
Describe the bug
yarn node
is using a surprising version of Node. I'm not sure where or when this version was even installed, but it certainly defies my expectations about which version is active. I also can't find a way to change the version used by Yarn, or any documentation of how the executable is selected.To reproduce
Environment
System: OS: macOS 12.4 CPU: (16) x64 Intel(R) Core(TM) i9-9880H CPU @ 2.30GHz Binaries: Node: 16.13.0 - /private/var/folders/wl/lpr944fn02v7lhmr6gjjclx00000gn/T/xfs-2b580fed/node Yarn: 3.2.2 - /private/var/folders/wl/lpr944fn02v7lhmr6gjjclx00000gn/T/xfs-2b580fed/yarn npm: 8.6.0 - ~/.volta/tools/image/npm/8.6.0/bin/npm
Additional context
This issue is tangentially related to #1177
I would expect
yarn node
to use the node version provided in theengine.node
field ofpackage.json
, or to throw a warning if the version it's using does not match.The text was updated successfully, but these errors were encountered: