Monday, August 13, 2012

Updating Coffeescript

I realized that the coffeescript version I was using wasn't up to date. I have OCD with issues like this and decided to do something about it.

On my terminal, I typed in...
sudo npm install -g coffee-script
... and got a series of error messages, one of which was...
npm ERR! error installing coffee-script@1.1.2 
Error: Refusing to delete: /usr/local/bin/coffee 
not in /usr/local/lib/node_modules/coffee-script
What I understood from this was that, coffeescript was installed in a different directory, /usr/local/bin/coffee, and the new install wanted to install at /usr/local/lib/node_modules/coffee-script

Google is the programmer's best friend. When I am faced with situations like these, I look it up. The solution that worked for me was...
sudo npm install -g coffee-script --force

What happened was that I gave permission to the machine to do what had to be done to install coffeescript ( --force)... and that (I think) deleted the /usr/local/bin/coffee, then installed coffeescript into /usr/local/lib/node_modules/coffee-script

Now, my pc is running Coffeescript v 1.3.3
$ coffee -v
CoffeeScript version 1.3.3

I have been in front of the computer since 9am. It is now 12.48pm. Time for a break--YOGA time!

No comments:

Post a Comment