aaronpowell / ps-nvm

PowerShell module for managing multiple Node.js versions
MIT License
127 stars 25 forks source link

npm prefix not set #70

Closed aaronpowell closed 5 years ago

aaronpowell commented 6 years ago

When you set a node version the npm prefix should be relative to the node version you're using.

I think we can just get away with setting $NPM_CONFIG_GLOBALCONFIG and creating a custom .npmrc file that is in the current node version folder.

k-j-kleist commented 6 years ago

Good thinking. From my PowerShell profile:

# after installing a newer version of node.js, do the following once...
#
#     npm config set prefix 'C:\n\npm\vX.Y.Z'
#     npm config set cache 'C:\n\npm-cache\vX.Y.Z'
#
# ... using the output from these two commands:
#
#   Get-NodeInstallLocation
#   node --version
aaronpowell commented 6 years ago

Yeah I just noticed it as I'm setting up a new machine and realised it wasn't working 😝