I can't install CoffeeScript on my Macbook. The same commands works just fine on my iMac.
$ surganov:~ surganov$ sudo npm install coffee-script -g
npm http GET https://registry.npmjs.org/coffee-script
npm http 304 https://registry.npmjs.org/coffee-script
/usr/local/share/npm/bin/coffee -> /usr/local/share/npm/lib/node_modules/coffee-script/bin/coffee
/usr/local/share/npm/bin/cake -> /usr/local/share/npm/lib/node_modules/coffee-script/bin/cake
coffee-script@1.3.3 /usr/local/share/npm/lib/node_modules/coffee-script
$ surganov:~ surganov$ coffee
-bash: coffee: command not found
If you want to access coffescript binary globally, you need to install it so:
npm install -g coffee-script
And then add the installation directory to your PATH
. Good way to automate this is to use nvm.
I had the same problem. When install with '-g', npm install to /usr/local/share/npm so you can't use, eg 'coffee' command. You can check where npm install node_modules with:
npm prefix -g
If it's not /usr/local then you can use npm config edit
to edit prefix. It'll create a .npmrc file in your root (if it's not there). Otherwise, open the file with text editor and change the prefix. More info here: npm config