Open donniean opened 5 years ago
I installed Node with Scoop and encountered a similar issue. Here's how I resolved it:
Set NODE_PATH
Variable: Confirm the npm Global Prefix. This determines where global npm modules are installed. Check the prefix by running:
npm config get prefix
# In my case: E:\Apps\scoop\persist\nvm\nodejs\nodejs
Right-click "This PC" > Properties > Advanced system settings > Environment Variables.
In the "User variables"
section, verify if NODE_PATH
exists.
If not, create a new variable named NODE_PATH
with the value as the path to your global npm modules directory (e.g., E:\Apps\scoop\persist\nvm\nodejs\nodejs
).
Restart your PowerShell or terminal by closing and reopening it.
Type npm-check -g
in your terminal, and you should see something like this :
node v12.4.0 (installed by Scoop)
npm v6.9.0
My Node.js installed by Scoop
out put