I add the exact same error while doing
php app/console assetic:dump --env=prod
On Ubuntu there is a confusion between node and nodejs binary.
To solve this you need to install node binary.
In my case the binary was nodejs, so it didn't work.
On Ubuntu the command which node
will tell you if node is instaled.
Try which node
and if it doesn't work try which nodejs
.
So to be sure there is no confusion I did :
sudo apt-get remove nodejs
curl -sL https://deb.nodesource.com/setup_4.x | sudo -E bash -
sudo apt-get install -y nodejs
Check on node website for the correct url in the curl command. You might want node 5.X.
Now when you do
which node
/usr/bin/node
You have the correct binary name (node instead of nodejs).
After this it should work. If not check the node path in config.yml (check that there is no other declaration in config_prod and config_dev )