2015-10-08 145 views
0

我在我的Mac上安装了cordova,并且想要卸载它。无法在OSX上卸载npm模块

我已经试过如下:

npm uninstall cordova -g 

,但我得到了以下错误:

npm WARN uninstall not installed in /usr/local/Cellar/node/0.10.32/lib/node_modules: "cordova" 

任何想法?

+0

你用“自制”安装它吗? – br3w5

+0

我不这么认为。我得到:“错误:没有这样的小桶:/ usr/local/Cellar/cordova”如果我尝试“brew卸载cordova -g” – Weblurk

+0

,但是你用自制软件安装了'node'吗? – br3w5

回答

1

有方式homebrewnpm一起玩的知道问题。从this article by Dan Herbert

There's an NPM bug for this exact problem. The bug has been "fixed" by Homebrew installing npm in a way that allows it to manage itself once the install is complete. However, this is error-prone and still seems to cause problems for some people. The root of the the issue is really that npm is its own package manager and it is therefore better to have npm manage itself and its packages completely on its own instead of letting Homebrew do it.

除此之外,您的节点版本已过时。如果你可以升级你应该这样做到节点v4.1.2。请按照node.js网站上的说明进行操作。