Earlier today, I accidently removed my npm installation. After trying to run an npm command from terminal I recieved the following error.

$ -bash: /usr/local/bin/npm: No such file or directory

To fix this, I reinstalled npm from source using git.

$ git clone http://github.com/isaacs/npm.git
$ cd npm
$ sudo make install