npm install doesn't work in Windows PowerShell
For me, it was much easier to do this in Powershell.
$env:Path += ";C:\Program Files\nodejs\"
Ran "npm" in powershell, and came up straight away.
Use .npmrc
to set the prefix explicitly:
Go to
\Users\%USERNAME%\.npmrc
. For example, in Powershell:Notepad "\Users\$env:USERNAME\.npmrc"
Set the prefix:
prefix = "C:/Program Files/nodejs"
References