I am trying to run another NodeJS version with nvm but getting this error:
$ nvm use v4.2.4
nvm is not compatible with the npm config \"prefix\
I have the same error message but other solution. The autogenerated path during curl (install.sh) does not match. Check this with:
echo $NVM_DIR
In my case: /var/www//.nvm. Show in your auto generated bash file and change it and replace it: (~/.bash_profile, ~/.zshrc, ~/.profile, or ~/.bashrc)
replace
export NVM_DIR="$HOME/.nvm"
with (e.g.)
export NVM_DIR="$HOME.nvm"