无法在OSX上卸载npm模块 [英] Can't uninstall npm module on OSX

查看:83
本文介绍了无法在OSX上卸载npm模块的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经在Mac上安装了cordova,并希望将其卸载.

I have installed cordova on my mac and want to uninstall it.

我尝试了以下操作:

npm uninstall cordova -g

但出现以下错误:

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

有什么想法吗?

推荐答案

homebrewnpm一起玩的方式存在一些已知问题.摘自丹·赫伯特的这篇文章

There are know issues with the way homebrew and npm play together. From this article by Dan Herbert

对于这个确切的问题,有一个 NPM错误.该错误已由修复" 自制软件以一种可以自行管理的方式安装npm 安装完成.但是,这很容易出错,而且看起来 给某些人带来麻烦问题的根源是 那npm是它自己的包管理器,因此最好拥有 npm完全自行管理自身及其软件包,而不是完全 让Homebrew做到这一点.

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 网站上的说明进行操作.

Aside from that your node version is out of date. If you can upgrade you should do so to Node v4.1.2. Follow the instructions on the node.js site.

这篇关于无法在OSX上卸载npm模块的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆