I have installed Grunt & Bower & I\'m using ZSH.
when I type bower --help
or grunt anything
I get zsh: command not found: bower
I used yarn
instead of npm
:
yarn add grunt grunt-cli
yarn grunt
It worked for me. Hopefully, it will help someone else :)
When you install grunt (bower), terminal tell you directory. For those using a ZSH shell, add this to .zshrc:
export PATH=/usr/you/directory/npm/bin:$PATH,
I find it using:
/lib/node_modules
export PATH=/usr/lib/node_modules/npm/bin:$PATH
Add /usr/local/share/npm/bin/
to your $PATH environment
I couldn't get the above to work. Problem was that I had just reinstalled my Mac and forgotten to re-install grunt.
You can test that grunt is actually installed and working properly outside of zshell by going back to bash with bash -l
and running grunt
.
If grunt is throwing the same error you can install grunt by running:
sudo npm install -g grunt-cli
Run zsh
to get back to zshell.
When you installed, did you install globally?
npm install -g bower
give that a try. If not, also try adding sudo
sudo npm install -g bower
If you are using the GNOME-Terminal (default in Ubuntu Unity and Gnome) try the answer of https://askubuntu.com/questions/279180/nvm-command-not-found-issue.