For my prod environment I want to use the UglifyCSS filter configured as follows (config_prod.yml):
assetic:
filters:
uglifycss:
node: /usr/bin/env node
bin: /usr/local/bin/uglifycss
apply_to: "\.css$"
But whenever I run
php app/console assetic:dump --env=prod --no-debug
I get this error message:
[Assetic\Exception\FilterException]
An error occurred while running:
'/usr/local/bin/node' '/usr/bin/uglifycss' '/tmp/inputtyeA2H'
Error Output:
node.js:201
throw e; // process.nextTick error, or 'error' event on first tick
^
Error: Cannot find module '/usr/bin/uglifycss'
at Function._resolveFilename (module.js:332:11)
at Function._load (module.js:279:25)
at Array.0 (module.js:479:10)
at EventEmitter._tickCallback (node.js:192:40)
So obviously Assetic is looking for uglifycss in /usr/bin
though I configured it to use a different path, /usr/local/bin
. Does anyone know what's going on here?
node
andbin
paths out of the environment-specific config files. Or only passes them if they're in the environment specific files. Or the env specific configurations completely override the settings from the main config file (instead of merging them). I'm not sure which. – Woodsia