Npm-check-updates: zsh: command not found: ncu

Created on 6 Sep 2018  路  5Comments  路  Source: raineorshine/npm-check-updates

[email protected]
[email protected]
[email protected]
[email protected]
Mac [email protected]

When I install npm-check-updates and thereafter use the ncu or the npm-check-update command, I just get the "command not found".

I hope someone can help? Thanks

unable-to-reproduce

All 5 comments

Hi Vayu. Sorry for the trouble! Do other global npm packages work? Have you tried uninstalling and reinstalling npm-check-updates? Do you get anything from the command type ncu?

I'm not sure what the issue is, but it seems like it is at the level of your environment rather than npm-check-updates.

Thanks for responding. Good questions. After a few hours of trying to find a problem, I realized that adding this /usr/local/share/npm/bin to my PATH in .zshrc fixed the problem.
Thanks for helping!

For Windows uers, add to PATH:

C:\Users\UserName\AppData\Roaming\npm

And restart terminal

Hi, could anyone help me?
I'm having this "command not found" issue too.
I'm using mac. Which file should I open and what do I need to write in it to correct the path?
Thank you.

@giulianagabrielli

  1. Where is npm located on your machine?

    • Enter this in a terminal: type npm.

  2. What is in your PATH?

    • node -p "console.log(process.env.PATH.split(':').join('\n'))"

You might have to add something like this to your ~/.bash_profile file:

export PATH=$HOME/local/bin:$PATH

Or this:

npm config set prefix /usr/local

This is probably the answer you want:
https://stackoverflow.com/questions/14803978/npm-global-path-prefix

Was this page helpful?
0 / 5 - 0 ratings

Related issues

fatso83 picture fatso83  路  3Comments

mkungla picture mkungla  路  6Comments

benface picture benface  路  7Comments

ibc picture ibc  路  7Comments

JanWeskamp picture JanWeskamp  路  3Comments