大佬教程收集整理的这篇文章主要介绍了node.js – nvm与npm配置“前缀”选项不兼容:,大佬教程大佬觉得挺不错的,现在分享给大家,也给大家做个参考。
$nvm use v4.2.4 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.
我有我的前缀设置是为了避免sudo npm(见https://docs.npmjs.com/getting-started/fixing-npm-permissions).
export NVM_DIR=~/.nvm . $(brew --prefix nvm)/nvm.sh
(检查你在任何〜/ .bashrc或〜/ .profile或〜/ .bash_profile中没有任何其他与nvm相关的命令)
打开一个新的终端,这次不应该打印任何警告信息.
通过执行nvm –version命令检查nvm是否正常工作.
之后,使用Nvm install node&&&&&&&& nvm别名默认节点.
更多信息
我使用自制软件安装nvm,安装成功后,会通知我一些重要信息:
Please note that upstream has asked us to make explicit managing nvm via Homebrew is unsupported by them and you should check any problems against the standard nvm install method prior to reporTing. You should create NVM's working directory if it doesn't exist: mkdir ~/.nvm Add the following to ~/.bash_profile or your desired sHell configuration file: export NVM_DIR=~/.nvm . $(brew --prefix nvm)/nvm.sh You can set $NVM_DIR to any LOCATIOn,but leaving it unchanged from /usr/local/Cellar/nvm/0.31.0 will destroy any nvm-installed Node installations upon upgrade/reinstall.
nvm is not compatible with the npm config "prefix" option: currently set to "/usr/local/Cellar/nvm/0.31.0/versions/node/v5.7.1" Run `nvm use --delete-prefix v5.7.1 --silent` to unset it.
我遵循之前的指南(从homebrew / nvm),之后我发现我需要重新安装NodeJs.所以我运行这个命令:
nvm install node && nvm alias default node
这个问题去了地狱!
以上是大佬教程为你收集整理的node.js – nvm与npm配置“前缀”选项不兼容:全部内容,希望文章能够帮你解决node.js – nvm与npm配置“前缀”选项不兼容:所遇到的程序开发问题。
如果觉得大佬教程网站内容还不错,欢迎将大佬教程推荐给程序员好友。
本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。
如您有任何意见或建议可联系处理。小编QQ:384754419,请注明来意。