找不到凉亭命令 [英] bower command not found
本文介绍了找不到凉亭命令的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我试图在Mac上安装twitter bower,并且使用了
I tried to install twitter bower on my Mac, and I used
npm install bower -g
然后我尝试了bower --help
,输出为bower command not found
.为什么会这样?
Then I tried bower --help
, and the output was bower command not found
. Why is that?
推荐答案
就像在这个问题中一样( npm全局路径前缀),您只需设置正确的npm prefix
.
Just like in this question (npm global path prefix) all you need is to set proper npm prefix
.
UNIX:
$ npm config set prefix /usr/local
$ npm install -g bower
$ which bower
>> /usr/local/bin/bower
Windows和NVM:
$ npm config set prefix /c/Users/xxxxxxx/AppData/Roaming/nvm/v8.9.2
$ npm install -g bower
然后bower
应该位于您的$PATH
中.
这篇关于找不到凉亭命令的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文