2015-10-08 148 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網站上的說明進行操作。