I'm having this issue when I try to install Grunt, I'm getting:
$ npm install -g grunt-cli
-bash: npm: command not found
I use Homebrew for intallations and as you can see on the list node is there:
$ node -v
v0.10.29
$ which node
/usr/local/bin/node
$ brew list
autoconf jpeg mhash php55-mcrypt zlib
fontconfig libpng mysql pkg-config
freetype libtiff node rbenv
gd libtool openssl ruby-build
gettext mcrypt php55 unixodbc
This is the error I get after installing node(no idea what it mean):
..........
npm ERR! Additional logging details can be found in:
npm ERR! /usr/local/lib/node_modules/npm/npm-debug.log
npm ERR! not ok code 0
make[1]: *** [node_modules/.bin/ronn] Error 3
make: *** [man/man3/npm-bin.3] Error 2
..........
==> Summary
/usr/local/Cellar/node/0.10.29: 1547 files, 18M
Not sure but I think my problem is the PATH which I've been trying to fix with no success. This is my .bash_profile:
export PATH="~/.rbenv/shims:$(brew --prefix josegonzalez/php/php55)/bin:/usr/local/bin:$PATH"
eval "$(rbenv init -)"
I'm confused! Any help here? Thanks.
It looks like brew prune made the trick:
I ran brew uninstall node and then brew prune, then brew install node and voilà! It allowed me to installnode with no errors, npm also, and grunt.
Also, a recommended worth to read article I found: http://www.joshstaiger.org/archives/2005/07/bash_profile_vs.html