Node and npm installation using brew

时间:2015-06-30 13:29:46

标签: node.js ubuntu npm homebrew linuxbrew

I am doing some setup whcih required me to uninstall earlier node and npm setup, and install again using brew. But when i uninstalled it, and then installed it using brew install node, it gives me an error "bash: /usr/bin/npm: No such file or directory"

I uninstalled them once again, and when I type node (to see which path it is called in) I get, "bash: /home/username/.linuxbrew/bin/node: No such file or directory"

Whereas if I type npm I get, "bash: /usr/bin/npm: No such file or directory"

I think maybe the reason of error is this discrepancy in both the paths. Any suggestions on how to install it correctly using brew?

1 个答案:

答案 0 :(得分:1)

你犯了同样的错误。互联网上有关于如何安装在Google上出现的节点的错误说明。他们说分别安装npm。错误。 npm包含在nodejs中(它也不称为“节点”.Nodejs会告诉你名称“node”是不同作者的不同程序。)

请按照以下说明操作:

https://nodejs.org/en/download/package-manager/