Skip to content

HAML and LESS Lab Workaround

karlstolley edited this page Nov 19, 2014 · 3 revisions

YOU DO NOT NEED TO RUN THESE COMMANDS ON YOUR OWN COMPUTER. npm install -g haml-coffee coffee-script less will suffice for a computer you control; the following instructions are for lab machines only.

Specifically, because the -g flag is failing on the lab machines running npm, these instructions will allow you to set up the haml-coffee, coffee-script, and less packages for the lab machines:

$ npm install haml-coffee coffee-script less
$ mkdir bin
$ cd bin
$ ln -s $HOME/node_modules/coffee-script/bin/coffee coffee
$ ln -s $HOME/node_modules/haml-coffee/bin/haml-coffee haml-coffee
$ ln -s $HOME/node_modules/less/bin/lessc lessc

Then, make sure your .zshrc file is loading up your ~/bin directory into your path by running:

$ cat ~/.zshrc | grep \$HOME\/bin

You should see output like export PATH="$HOME/bin:/usr/local/bin:/usr/local/sbin:$PATH.

If you don't, open up your .zshrc file, find the line that begins export PATH=" and change it to read export PATH="$HOME/bin: ahead of whatever other contents are already inside of the quotation marks for export PATH="". Then, run source ~/.zshrc from the command line.

Finally, run which coffee -- you should see output like /home/<username>/bin/coffee

Clone this wiki locally