-1

I am trying to build c++ project and see below error: Would you please take a look?

/bin/sh: npm: command not found
make[2]: *** [modules/GUI/CMakeFiles/Client] Error 127
make[1]: *** [modules/GUI/CMakeFiles/Client.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....

I followed this wiki: sudo: npm: command not found But it doesn't work for me.

For MAC users, the follow steps worked for me, the error still there.

$ brew update
$ brew uninstall node
$ brew install node
$ brew postinstall 
reactnative
  • 505
  • 2
  • 7
  • 14

1 Answers1

0

Did you see this?

Have you tried: brew doctor?

What do you get when you do:

which node
which npm

If you get anything for node, look for the path and see what is nearby.

Worst case scenario, if you have not added anything else to brew, consider removing brew and reinstalling.

FYI: For me, using nvm, I see this:

➜  ~ which npm
/Users/pgkehle/.nvm/versions/node/v11.15.0/bin/npm
➜  ~ which node
/Users/pgkehle/.nvm/versions/node/v11.15.0/bin/node

Your path will be different, but consider nvm as an alternative.

Isaac Kehle
  • 101
  • 1
  • 9