Reputation: 45
After installing oh-my-zsh and reinstalling node and npm again, I install npm-check-updates globally and try to call 'ncu' (the npm-check-updates command). However, I get an error: zsh:
command not found: ncu
. Does anyone know how to fix this?
Upvotes: 3
Views: 4836
Reputation: 61
I have corrected this problem with the following instructions:
sudo npm install -g npm-check-updates
Upvotes: 6
Reputation: 45
FYI I am using a OSX.
The problem was that my export path
in my .zshrc
was wrong.
This was what it was previously:
export PATH=$HOME/bin:/usr/local/bin:$PATH
.
Notice there is nothing pointing at npm or any of the packages I installed globally. For anyone who has this problem in the future...
npm -g list --depth 0
to list all your global packages.bin
folder.export PATH
string accordingly:export PATH=$HOME/bin:/usr/local/bin:**$HOME/.npm/bin**:$PATH
.
This worked for me!
Upvotes: 0
Reputation: 12020
After an install you can run rehash
so zsh will analyse what new executables are available on $PATH.
Not sure if that would fix the problem, I know it fixes the missing tab completion entry after install.
Upvotes: 1
Reputation: 133
Make sure the 'ncu' package can be found in the $PATH environment variable. Try this, to find where 'ncu' is supposed to be installed:
which ncu
If it still gives you trouble, try to see if it's in /usr/bin, $HOME/npm/bin, /usr/local/lib or /usr/sbin, and check that your $PATH environment variable contains a way to 'ncu'. Your $PATH environment variable, which can be found in
$HOME/.bashrc (Linux)
$HOME/.bash_profile (MacOS)
should look something like this:
export PATH=$PATH:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:$HOME/npm/bin
Upvotes: 0