brew安装节点错误

时间:2014-01-19 21:52:51

标签: node.js homebrew

我在通过自制软件安装节点时遇到问题。

$ brew install node

返回:

node: Beginning with 0.8.0, this recipe now comes with npm.
It appears you already have npm installed at /usr/local/lib/node_modules/npm.
To use the npm that comes with this recipe, first uninstall npm with
`npm uninstall npm -g`, then run this command again.

If you would like to keep your installation of npm instead of
using the one provided with homebrew, install the formula with
the `--without-npm` option.
Error: An unsatisfied requirement failed this build.

当我运行npm uninstall时,我得到一个命令not found错误。有什么建议吗?

注意:在某个时间点,我已经卸载了brew和npm。我在想一些剩余的包导致这个错误?

2 个答案:

答案 0 :(得分:3)

您是否安装了不是来自自制程序的节点版本?如果没有,那么即使npm在你的路径中,它也可能不会运行,因为它需要节点才能运行。

假设你想从homebrew开始使用node,你应该可以安全地删除/usr/local/lib/nodemodules/目录。这应该摆脱自制的警告。您可能需要先记下安装在那里的任何内容,以便在通过自制软件安装node和npm后重新安装。

答案 1 :(得分:0)

我倾向于认为你已经安装了node bot没有将节点映射到系统PATH变量,检查一下,如果是这样,先卸载map你的旧安装,你应该没问题