-
Notifications
You must be signed in to change notification settings - Fork 3.9k
Closed
Labels
Bugthing that needs fixingthing that needs fixingNeeds Triageneeds review for next stepsneeds review for next stepsRelease 8.xwork is associated with a specific npm 8 releasework is associated with a specific npm 8 release
Description
Is there an existing issue for this?
- I have searched the existing issues
This issue exists in the latest npm version
- I am using the latest npm
Current Behavior
Currently npm can not be used if there is more than one node version installed,
because npm will ignore the calling node runtime,
and npm will ignore the node runtime on the PATH,
and npm will refuse to run from node directly,
instead npm will use an arbitrary runtime.
Expected Behavior
npm should use the current runtime, and respect $PATH.
Steps To Reproduce
sudo which -a node
/usr/local/bin/node
/usr/bin/node
/bin/node
sudo which node
/usr/local/bin/node
sudo /usr/local/bin/node --version
v17.1.0
sudo /usr/local/bin/node /usr/local/bin/npm install -g node@latest
...
npm ERR! npm WARN npm npm does not support Node.js v10.19.0
...
node
Welcome to Node.js v17.1.0.
Type ".help" for more information.
> npm install -g node@latest
npm should be run outside of the Node.js REPL, in your normal shell.
(Press Ctrl+D to exit.)
>
Environment
- npm:8.1.4
- Node:v17.1.0
- OS:Ubuntu 20.04.3 LTS
- platform:Dell XPS 13 9310
- npm config:
; node bin location = /home/user/node_modules/node/bin/node
; cwd = /home/user/Documents/eclipse-workspace/Noodle
; HOME = /home/userMetadata
Metadata
Assignees
Labels
Bugthing that needs fixingthing that needs fixingNeeds Triageneeds review for next stepsneeds review for next stepsRelease 8.xwork is associated with a specific npm 8 releasework is associated with a specific npm 8 release