tchap tchap - 3 months ago 47
PHP Question

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 return 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?

Thanks a lot!

Answer

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

$ npm install
$ npm run gulp