3

I cannot get my Mac OS 10.8.5 to find the modules that npm installed globally. I am trying to execute bbb from the command line, but when I try to execute it, I get

 $ bbb -bash: bbb: command not found 

I believe it is installed correctly:

 $ npm ls -g | grep bbb ├── [email protected] ├─┬ [email protected] ├─┬ [email protected] ├─┬ [email protected] ├─┬ [email protected] 

Lots of people recommended putting /usr/local/share/npm/bin in their $PATH so I tried that:

$ env | grep PATH PATH=/usr/local/bin:/usr/local/opt/ruby/bin:/usr/local/share/npm/bin:/usr/local/bin:/usr/local/opt/ruby/bin:/usr/local/share/npm/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/opt/X11/bin NODE_PATH=/usr/local/lib/node_modules 

Does anyone have any other ideas with what can be going wrong? Thanks.

2 Answers 2

1

If you look in bbb's package.json, it has no bin property, so you can't execute the command from the command line because it was not written to have command line functionality. Not all Node.js modules are created with use on the command line.

Sign up to request clarification or add additional context in comments.

Comments

0

the bin of the location where your npm is installing the global packages needs to be in your path.

For example when i install a global package i get:

npm install -g npm-check-updates /usr/local/Cellar/node/0.10.32/bin/ncu -> /usr/local/Cellar/node/0.10.32/lib/node_modules/npm-check-updates/bin/ncu /usr/local/Cellar/node/0.10.32/bin/npm-check-updates -> /usr/local/Cellar/node/0.10.32/lib/node_modules/npm-check-updates/bin/npm-check-updates

You can see in the output above that directory where my executable files are is: /usr/local/Cellar/node/0.10.32/bin. So in my case I have added that location to my path.

Check your bin location and add that.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.