Skip to content

Instantly share code, notes, and snippets.

@gadzhimari
Last active October 2, 2018 12:52
Show Gist options
  • Save gadzhimari/30dd35c3add54b8deeb44e13c4626c96 to your computer and use it in GitHub Desktop.
Save gadzhimari/30dd35c3add54b8deeb44e13c4626c96 to your computer and use it in GitHub Desktop.
NVM

NVM is not compatible with the npm config "prefix" option

Solution: Try config the $NVM_DIR reference again. For example nvm use v7.10.0, and have the error: Run npm config delete prefix or nvm use --delete-prefix v7.10.0 --silent to unset it. You need overwrite nvm prefix,

npm config set prefix $NVM_DIR/versions/node/v7.10.0

Update node via nvm

Solution:

Latest version:

nvm install node --reinstall-packages-from="10.3.0"

Stable (LTS) version:

nvm install lts/* --reinstall-packages-from=node

This will install the appropriate version and reinstall all packages from the currently used node version.

Path where npm execute global packages:

npm bin -g(--global) show path to globally installed packages or just npm bin for local installed packages

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment