I have a good install of
Node@v0.8.14 and NPM@1.1.65 on OS X 10.8.2 for local development.
Everything works as expected except for packages that I try to install with the -g
flag for global, like grunt or forever, aren't found as terminal commands.
I have tried adding some paths but nothing's worked so far...
Here's my standard echo $PATH
/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/:/usr/local/bin:/usr/local/share:/usr/local/share/npm:/usr/local/share/npm/lib/node_modules/:.npm
Thanks for the help!
I had this same issue - I resolved it by installing n globally
npm install -g n
Worked for me
I got this problem as well. You need to check your npm prefix, change it to /usr/local if it's not. Check my answer here.
The only solution that worked for me was installing modules right into my user folder, like:
cd ~
npm install whatever
This is not a pretty solution as soon my user folder now have a node_modules directory, but I'm tired to try make things right.
install NPM modules with sudo command,
like this
sudo npm install -g express