Django Pipeline node cannot find lessc

857 Views Asked by At

I'm configuring Django Pipeline, which I have done before on Linux without issues. On OSX I get the following issue when using Less:

CompilerError: env: node: No such file or directory

The message comes from the stderr of the command pipeline is trying to execute:

/usr/local/bin/lessc  /foo/bootstrap.less /bar/bootstrap.css

Which I can run from the terminal without any issues with the Python virtualenv active (or not). I have tried installing lessc with and without the -g flag.

It seems node and lessc are setup fine on the system and PIPELINE_LESS_BINARY is set correctly but no joy.

Node and Less were installed with brew on OSX 10.10 (yosemite)

Any ideas?

1

There are 1 best solutions below

1
On BEST ANSWER

I presume the env your django commands operates on does not have the PATH setted correctly for node, a hacky solution could be to locate the node binary with which node and then link it to /usr/bin:

sudo ln -s node_binary_path /usr/bin/node