Closed aaronpowell closed 5 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
Yeah I just noticed it as I'm setting up a new machine and realised it wasn't working 😝
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.