Symfony2 Assetic: Path to node executable could not be resolved

Serhii Smirnov picture Serhii Smirnov · Mar 5, 2014 · Viewed 11.9k times · Source

When running app/console assetic:dump, I am getting:

Path to node executable could not be resolved

What does it mean and how to fix this?

When trying to browse project via app_dev.php, I am getting an HTTP 500 errors when browser tries to download css and js files.

Answer

TheDevilOnLine picture TheDevilOnLine · Apr 15, 2014

First make sure you have node installed and find the path to node. You can usually find this by using which node which will return something like /usr/local/bin/node. If it returns something like /usr/bin/which: no node in ... you need to install node.

Next configure symfony. Open your config.yml (./app/config/config.yml) and the path to node to you assetic config, i.e.:

# app/config/config.yml
assetic:
    node: /usr/local/bin/node