简体   繁体   English

卸载使用不同版本的npm安装的bower

[英]Uninstalling bower installed with a different version of npm

I have an Ubuntu 14.04 system. 我有一个Ubuntu 14.04系统。 I had installed npm and I installed bower using 我安装了npm,我安装了凉亭

sudo npm install -g bower

Some time after that I realized that I was using the node and npm that came fromt he ubuntu repositories, so to use the latest one, I added the repository: 一段时间后,我意识到我正在使用来自ubuntu存储库的节点和npm,所以为了使用最新版本,我添加了存储库:

$ sudo add-apt-repository ppa:chris-lea/node.js

and update the packages. 并更新包。

Now I was trying to uninstall bower from the system, but guess what? 现在我试图从系统中卸载bower,但猜猜是什么? I get this: 我明白了:

$ sudo npm remove -g bower
npm WARN uninstall not installed in /usr/lib/node_modules: "bower"

So, wait, what? 那么,等等,什么? It cant find Bower? 它无法找到鲍尔? So I try to make 所以我试着去做

which bower

and the output here is: 这里的输出是:

/usr/local/bin/bower

I dont really understand what is going on. 我真的不明白发生了什么。 I suspect that I have a problem with different versions of npm and nodejs not playing nice together, since I installed bower with a different version of npm that the one I have installed now. 我怀疑我遇到了不同版本的npm和nodejs一起玩不好的问题,因为我安装了bower与我现在安装的不同版本的npm Any idea of how I could uninstall Bower now? 我现在怎么能卸载Bower的想法? (Or at least come back to a clean state, so that I can begin from the beginning?) (或者至少回到一个干净的状态,以便我可以从头开始?)

sudo npm uninstall bower -g --prefix=/usr/local

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM