Search code examples
phpnpmyarnpkgsylius

Sylius-Standard admin panel : no css/js


I've installed the latest Sylius-Standard (based on Sylius 1.0@dev) and followed the quick tutorial. Everything is working fine except the admin panel, where CSS and JS return 500 when accessed in dev mode (via app_dev.php).

demo

I can see that they are fetched from a path that does not include app_dev.php. For instance, app.js is fetched from http://my.local.domain/assets/admin/js/app.js, which returns a 500 because it tries to access the prod database that is not setup.

There should be no need to create the prod database or install prod assets to access the admin panel in dev mode — what am I doing wrong?


Solution

  • Sylius use a gulp library to manage css and js. The following command should fix your problem:

    $ npm install
    $ npm run gulp
    

    Edit

    After a few years, this is the proper answer: https://stackoverflow.com/a/59135635/4243630