tchap
tchap

Reputation: 3432

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?

Upvotes: 3

Views: 1683

Answers (2)

Roydon D' Souza
Roydon D' Souza

Reputation: 425

In order to see a fully functional frontend you will need to install its assets.

Sylius uses Gulp to build frontend assets using Yarn as a JavaScript package manager.

Having Yarn installed, go to your project directory to install the dependencies:

$ yarn install

//Then build the frontend assets by running:

$ yarn build 

We are on Sylius 1.2.x, we followed the official documentation

This sorted out that problem for us.

If you are on 1.x this is the link to the documentation

This should solve your problem.

Upvotes: 1

lchrusciel
lchrusciel

Reputation: 359

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

Upvotes: 1

Related Questions