Runtime exception when trying to dump assetic for Symfony2 project using Windows 7 Runtime exception when trying to dump assetic for Symfony2 project using Windows 7 windows windows

Runtime exception when trying to dump assetic for Symfony2 project using Windows 7


integration of Symfony2 and Assetic

1. file config.yml

# Assetic Configurationassetic:    debug:          "%kernel.debug%"    use_controller: false    bundles:        [ ]    #java: /usr/bin/java    filters:        cssrewrite: ~    less:         node: "C:\\Program Files (x86)\\nodejs\\node.exe"        node_paths: ["C:\\Users\\websky\\AppData\\Roaming\\npm\\node_modules"]         apply_to:   "\.less$"    yui_css:         jar: %kernel.root_dir%/../java/yuicompressor-2.4.6.jar     yui_js:         jar: %kernel.root_dir%/../java/yuicompressor-2.4.6.jar         #closure:        #    jar: "%kernel.root_dir%/Resources/java/compiler.jar"

2. file base.html.twig

    <head>         {% stylesheets filter='less,?yui_css' '@AcmeBundle/Resources/less/main.less' %}         <link href="{{ asset_url }}" rel="stylesheet" media="screen" />         {% endstylesheets %}     </head> 

3. building assetic

php app/console assetic:dump --env=prod

useful link:Less Windows Node.js Hanging


try this

coffee:   bin: "C:\\Users\\xxxxx\\AppData\\Roaming\\npm\\coffee"   node: "C:\\Program Files\\nodejs\\node"

I had exactly the same problem with node. If this doesnt work, try pointing to the exact .exe path. Windows seems to have all sorts of trouble.

Good luck