Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我都试过了
'npm -g install bower' 和 'sudo pm -g install bower'
仍然说
'zsh:找不到命令:凉亭'
首先要检查的npm是安装路径是否bower在您的PATH/上path。跑
npm
bower
PATH
path
echo $PATH $path | grep $(echo $(npm config get prefix)/bin) && echo Found
那应该输出这个词Found。如果没有,您可以通过运行找出要添加的目录:
Found
echo $(npm config get prefix)/bin
可以在~/.zshenv文件中更改路径。
~/.zshenv