2

echo $PATH says :

echo $PATH
/opt/homebrew/bin:/opt/homebrew/sbin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin

When I run npm command, I get info and I can install packages. I run

npm install npm-check-updates

When I go for npm list

npm list
username@ /Users/username
├── g@2.0.1
├── gatsby-plugin-sitemap@2.12.0
└── npm@8.17.0

But when I go for

which ncu
ncu not found

ncu -u
zsh: command not found: ncu

I tried to edit .zhrc acordingly to accepted answer in 59480260, but it does not help at all. I guess the homebrew is my blocker?

Thank you for help! Im kind of lost in this PATH configurations

ragulin
  • 224
  • 2
  • 18

1 Answers1

0

You need to install this way:

npm install -g npm-check-updates

That creates the file /opt/homebrew/bin/ncu for you.

Your path looks fine, as it contains /opt/homebrew/.

ncu should be in /opt/homebrew/bin:

% file /opt/homebrew/bin/ncu
/opt/homebrew/bin/ncu: a /usr/bin/env node script text executable, ASCII text

Of note, it is .zshrc not .zhrc.

James Risner
  • 5,451
  • 11
  • 25
  • 47
  • This does not solve the problem unfortunately, the behaviour stays as it is with which ncu and ncu -u in the original question – ragulin Sep 13 '22 at 09:04
  • Thank you for help, but the problem remains, `ls -l % -l /opt/homebrew/bin/` `ls: %: No such file or directory` `ls: -l: No such file or directory` Im not sure what is wrong here. Maybe I have the NPM installed wrong way? – ragulin Sep 14 '22 at 16:55
  • 1
    I have tried to run brew update and install, and sudenly the NCU works, maybe there was some issue? You gave me the idea to try this, thank you very much ! – ragulin Sep 14 '22 at 17:02