0

I have the following versions of django and django-pipeline:

Django==1.10.3
django-pipeline==1.6.9

In /usr/bin/ I see "yui-compresssor" listed. Running collectstatic gives the following error.

pipeline.exceptions.CompressorError: /usr/bin/env: yuicompressor: No such file or directory

When I run my site with debug set to false it loads OK, but when debug is false I just get a 500 error page so the problem is when it is trying to compress the assets.

On my production settings file I have...

PIPELINE['CSS_COMPRESSOR'] = 'pipeline.compressors.yui.YUICompressor'
PIPELINE['JS_COMPRESSOR'] = 'pipeline.compressors.yui.YUICompressor'

Am I missing anything?

polarcare
  • 575
  • 1
  • 6
  • 24

1 Answers1

0

It should be

YUI_BINARY = '/usr/bin/yui-compressor'

Because '/usr/bin/env yui-compressor' is not path to binary

Another way to fix this is to create symlink

sudo ln -s /usr/bin/yui-compressor /usr/bin/yuicompressor
Sardorbek Imomaliev
  • 14,861
  • 2
  • 51
  • 63
  • I thought that must be it, but it is still giving me the same error. Copied directly from my prod settings I now have YUI_BINARY = '/usr/bin/yui-compressor' – polarcare Nov 22 '16 at 11:19