nvm is not compatible with the npm config “prefix” option:

Delete and Reset the prefix $ npm config delete prefix $ npm config set prefix $NVM_DIR/versions/node/v6.11.1 Note: Change the version number with the one indicated in the error message. nvm is not compatible with the npm config “prefix” option: currently set to “/usr/local” Run “npm config delete prefix” or “nvm use –delete-prefix v6.11.1 –silent” to … Read more

What is the recommended way to install Node.js, nvm and npm on MacOS X?

Using homebrew install nvm: brew update brew install nvm source $(brew –prefix nvm)/nvm.sh Add the last command to the .profile, .bashrc or .zshrc file to not run it again on every terminal start. So for example to add it to the .profile run: echo “source $(brew –prefix nvm)/nvm.sh” >> ~/.profile If you have trouble with … Read more

How to properly upgrade node using nvm

This may work: nvm install NEW_VERSION –reinstall-packages-from=OLD_VERSION For example: nvm install 6.7 –reinstall-packages-from=6.4 then, if you want, you can delete your previous version with: nvm uninstall OLD_VERSION Where, in your case, NEW_VERSION = 5.4 OLD_VERSION = 5.0 Alternatively, try: nvm install stable –reinstall-packages-from=current