Edit: I have added an answer on how to fix this in case someone struggles with it.
I have upgraded my laptop from Ubuntu 11 to 12.04 and for some reason
All sorted now. I had to delete all the exiting folders as well as everything from the ubuntu repositories containing the npm, coffee-script and node and install everything from git. Step by step installation:
1. clone https://github.com/joyent/node.git
2. git checkout v0.6.17 //current stable at my time
3. cd node && ./configure && make && make install
4. curl http://npmjs.org/install.sh | sudo sh
5. download coffeescript from git and do sudo bin/cake install
6. sudo npm install coffee-script -g
This should work