пятница, 2 октября 2015 г.

Symfony2: fix error on dumping assets with using less, in Ubuntu 14.04

If you got an error on dumping assets
 
$ php app/console assetic:dump 
 
[Assetic\Exception\FilterException]         
  An error occurred while running:            
  '/usr/sbin/node' '/tmp/assetic_lessl9esGS
 
Check anf fix all paths for nodejs and less, or just try this configuration
 
assetic:
    debug:          "%kernel.debug%"
    use_controller: false
    bundles:        [ ]
    #java: /usr/bin/java
    filters:
        less:
            bin: /usr/local/bin/lessc
            node: /usr/bin/nodejs
            node_paths: ["/usr/local/lib/node_modules"]
            apply_to: "\.less$"