There's a problem with installing my global modules properly.
Input
npm install coffee -g (or any other module)
Output
npm http GET https://registry.npmjs.org/coffee
npm http 200 https://registry.npmjs.org/coffee
{lots of dependencies}
[email protected] /usr/local/lib/node_modules/coffee
├── [email protected]
├── [email protected]
├── [email protected] ([email protected])
├── [email protected] ([email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected])
├── [email protected] ([email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected])
├── [email protected] ([email protected])
└── [email protected]
Input
coffee
Output
-bash: coffee: command not found
npm config get prefix: /usr/local/usr/local: Yes$PATH: /usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/opt/X11/bin/usr/local/share/npm exists: No/usr/local/lib/node_modules/coffee exists: Yes/usr/local/bin/coffee exists: NoWhat else can I do?
I won't add the direct link to coffee to my $PATH-variable, because that's not my job, that's the job of npm! Really, why should I use npm when I could do it by myself? I read that answer like 100 times and I have no words for this, which aren't against the rules on SO.
If you want to install CoffeeScript globally (as one of the tags suggests), you shall install coffee-script (not coffee). Additionally, sudo is required for installing global module on the Mac.
Command:
sudo npm install coffee-script -g
Input
% coffee
Output
coffee>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With