So, lately i checked my npm version and got this error message:
所以,最近我检查了我的npm版本,得到了这个错误信息:
Yogies-MacBook-Pro:bin yogieputra$ node --version
v0.12.7
Yogies-MacBook-Pro:bin yogieputra$ npm --version
-bash: /usr/local/bin/npm: No such file or directory
Yogies-MacBook-Pro:bin yogieputra$ brew install npm
Warning: node-0.12.7_1 already installed, it's just not linked
Anyone know how to fix this issue?
有人知道怎么解决这个问题吗?
2 个解决方案
#1
2
Run brew link node
or brew doctor
.
运行brew链接nodeor brew doctor。
You could need sudo
so sudo brew link node
您可能需要sudo so sudo brew链接节点
#2
1
To link already installed node, run following command:
要链接已安装的节点,请运行以下命令:
brew link homebrew/versions/node012
For further explanation, you can go through this.
为了进一步的解释,你可以看看这个。
#1
2
Run brew link node
or brew doctor
.
运行brew链接nodeor brew doctor。
You could need sudo
so sudo brew link node
您可能需要sudo so sudo brew链接节点
#2
1
To link already installed node, run following command:
要链接已安装的节点,请运行以下命令:
brew link homebrew/versions/node012
For further explanation, you can go through this.
为了进一步的解释,你可以看看这个。