|nvm is not compatible with the npm config “prefix” option: currently set to “/usr local/Cellar/nvm/0.34.0/versions/node/v10.16.0”
Ok, I need to be able to change
node versions for different projects.
npm is handy tool for such cases.
|_ I don’t have
Problem was that my fresh opened console didn’t know command
I had to run
nvm use xxx,
then it complained on
config prefix option,
npm config delete prefix didn’t give any result because
env: node: No such file or directory,
so I needed to run
nvm use --delete-prefix v10.16.0 which is solution for open tab of terminal only.
And I was supposed to repeat that everytime I open new window in terminal.
How I fixed that:
nvm use --delete-prefix v10.16.0to be able to start
nodeto ensure that it’s working
npm config delete prefixto ensure that it’s deleted
- run to set it back
npm config set prefix $NVM_DIR/versions/node/v10.16.0
So, basically I needed to reset nvm prefix.
I hope it will help you too 🤓