npm config delete prefix


It turns out that if you are an NVM package (fantastic tool for switching between nodejs versions) user in macOS you will come across at some point to the following error message when you open a bash or zsh terminal

npm config delete prefix or nvm use --delete-prefix vX.XX.XX --silent to unset it

The solution is actually pretty simple. You have to overwrite the $NVM_DIR reference variable. The way to do it is:

npm config set prefix $NVM_DIR/versions/node/v6.12.3

Instead of 6.12.3, of course, replace it with your node version and you should be good to go.

Exit mobile version