If NVM installs node under max, the solution to report the following error
nvm is not compatible with the npm config "prefix" option:
currently set to "/Users/z/.npm-global"
Run `npm config delete prefix` or `nvm use --delete-prefix v4.2.4` to unset it.
Solution: if the node is managed by NVM installed through brew, then
In ~ /. Bashrc, ~ /. Bash_ Profile, ~ /. Profile, or ~ /. Zshrc file, add the following command:
export NVM_NODEJS_ORG_MIRROR=https://npm.taobao.org/mirrors/node
export NVM_DIR="$HOME/.nvm"
source $(brew --prefix nvm)/nvm.sh
If the node managed by NVM is installed directly instead of through brew, then
In ~ /. Bashrc, ~ /. Bash_ Profile, ~ /. Profile, or ~ /. Zshrc file, add the following command:
export NVM_NODEJS_ORG_MIRROR=https://npm.taobao.org/mirrors/node
export NVM_DIR="$HOME/.nvm"
source ~/.nvm/nvm.sh
Similar Posts:
- How to install “CONDA command not found” in MAC Anaconda
- [Solved] JSCH cannot run JAVA bash:java:Command not found.
- Super detail: command not found: the scratch solution (add the scratch environment variable to Zsh under MAC)
- [Solved] NPM installation error: error: eacces: permission denied
- Error: Node Sass does not yet support your current environment: Windows 64-bit with Unsupport..
- [Solved] Linux Oracle bash: “sqlplus / as sysdba”: command not found
- NPM install socket.io[UNK][UNK] error: [UNK](npm WARN enoent ENOENT: no such file or directory, open ‘/usr/local/no…
- [Solved] Roscore display not installed Error: Command ‘roscore’ not found, but can be installed with…
- Mac ADB prompts command not found
- Solution to the problem of bash: gulp: command not found after installing gulp in Windows system