Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Command not found after npm install in zsh

Tags:

npm

macos

zsh

vows

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

like image 944
optikfluffel Avatar asked Oct 05 '12 10:10

optikfluffel


People also ask

Why npm install command not found?

On Windows, you may face the “npm command not found” error if the path to nodejs and npm are not added to your path variable. To fix this, locate the path to nodejs and npm binaries. The command above should add the specified directory to the path variable.

How do I fix npm not found on Mac?

in the case of mac os with homebrew.. two steps to do is to (1) which node (2) which npm which should be both in /usr/local/bin (where homebrew installs/symlinks node+npm)... to resolve.. try (1) brew doctor (2) brew reinstall node if its still giving issues.. check your path (echo $PATH).

How do I add a command to zsh?

On Ubuntu-based distros, you can install zsh using: sudo apt-get install zsh . Once the installation completes, you can check the version using zsh --version , then make zsh your default shell using chsh -s $(which zsh) . You'll need to log out, then log back in for the changes to take effect.

How do I fix npm not working?

The npm command not found error js server, which you can download from the nodejs.org website. Once you downloaded and installed Node. js, open the terminal and run the npm -v command. Once you see the npm version, you should be able to run the npm install command again.


1 Answers

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

like image 174
Abdennour TOUMI Avatar answered Oct 01 '22 23:10

Abdennour TOUMI