Command not found after npm install in zsh

optikfluffel picture optikfluffel · Oct 5, 2012 · Viewed 133.5k times · Source

I'm having some problems installing vows via npm in zsh. Here's what I get. I tried installing it with and without the -g option. Do you have any idea what's wrong here?

[❤  ~/Desktop/sauce-node-demo:master] npm install -g vows
npm http GET https://registry.npmjs.org/vows
npm http 304 https://registry.npmjs.org/vows
npm http GET https://registry.npmjs.org/eyes
npm http GET https://registry.npmjs.org/diff
npm http 304 https://registry.npmjs.org/eyes
npm http 304 https://registry.npmjs.org/diff
/usr/local/share/npm/bin/vows -> /usr/local/share/npm/lib/node_modules/vows/bin/vows
[email protected] /usr/local/share/npm/lib/node_modules/vows
├── [email protected]
└── [email protected]
[❤  ~/Desktop/sauce-node-demo:master] vows
zsh: command not found: vows

Thanks

Answer

Abdennour TOUMI picture Abdennour TOUMI · Nov 2, 2016

add source /home/YOUUSERNAME/.bash_profile at the beginning of ~/.zshrc

And all missing commands will be detected.

For Mac users : add source /Users/YOUUSERNAME/.bash_profile