So I've got a brand new Macbook Pro running 10.10.3 (14D2134). I installed Node.js
via their package installer you can download on https://nodejs.org/
From there I attempted to install grunt
via NPM but after getting the error -bash: npm: command not found
I realized NPM might need to installed in addition to the initial install of Node.
I tried removing Node all together following these instructions: How do I completely uninstall Node.js, and reinstall from beginning (Mac OS X) with the intention of reinstalling both Node and NPM via Homebrew. However, after following the above instructions and attempting to install Node with Homebrew, I recieved an error saying that Node is already installed (apparently I didn't completely remove every trace of it) but it just wasn't linked. So I followed the command line prompts to link Node and did so successfully.
So here I am with Node installed but still getting this nonsense. Please send help. xoxo.
Last login: Mon Jun 29 08:36:45 on ttys000
Jeremys-MacBook-Pro:~ jeremypbeasley$ node -v
v0.12.5
Jeremys-MacBook-Pro:~ jeremypbeasley$ npm install
-bash: npm: command not found
Jeremys-MacBook-Pro:~ jeremypbeasley$
I also tried sudo npm install npm -g
then Password but got sudo: npm: command not found
I also tried looking into the path if this helps:
Jeremys-MacBook-Pro:~ jeremypbeasley$ which node
/usr/local/bin/node
Jeremys-MacBook-Pro:~ jeremypbeasley$ echo $PATH
/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin
Jeremys-MacBook-Pro:~ jeremypbeasley$ ls -al /usr/local/bin/npm /usr/local/lib/node_modules
ls: /usr/local/bin/npm: No such file or directory
/usr/local/lib/node_modules:
total 0
drwxrwxr-x 2 502 staff 68 Jun 28 11:11 .
drwxrwxr-x 5 502 staff 170 Jun 28 11:24 ..
Jeremys-MacBook-Pro:~ jeremypbeasley$