0

I am trying to set up Symfony project on prod server and everything works fine except this one thing. I am using EasyAdminBundle for admin panel and there is something like this: my website without assets

It looks like my assets didn't load at all. But I had all the files in web/assets

$ ls web/assets/ -l
    total 1548
    drwxr-xr-x 3 andar-krakow andar-krakow    4096 2019-01-12 11:48 elfinder
    drwxr-xr-x 2 andar-krakow andar-krakow    4096 2019-01-12 11:48 jquery
    drwxr-xr-x 4 andar-krakow andar-krakow    4096 2019-01-12 11:48 jquery-ui
    -rw-r--r-- 1 andar-krakow andar-krakow 1381670 2019-01-12 11:48 require-built.js
    -rw-r--r-- 1 andar-krakow andar-krakow     733 2019-01-12 11:48 require.config.js
    -rw-r--r-- 1 andar-krakow andar-krakow   99864 2019-01-12 11:48 require.css
    -rw-r--r-- 1 andar-krakow andar-krakow   81836 2019-01-12 11:48 require.js

I also try to use php bin/console assets:install and php bin/console assets:install --symlink, but it didn't work. Maybe there is something config I forgot or there is a problem with permissions. When I use assets:install , there is something like this:

$ php bin/console assets:install

Installing assets as hard copies.


[OK] No assets were provided by any bundle.   

I have assetic bundle installed, project based on Symfony 3.4, EasyAdminBundle 1.17

Helenesh
  • 3,999
  • 2
  • 21
  • 36
Eddy
  • 593
  • 8
  • 22

1 Answers1

0

I found the answer. I looked on js console and checked which files can't be loaded. There was missing a public/ folder in vendor/easycorp/easyadmin-bundle/src/Resources/ where all needed files schould be. I uploaded them from my local machine and it works.

Did someone knows why composer install don't always include all necessary files?

Eddy
  • 593
  • 8
  • 22
  • 4
    Assets should be installed via `bin/console assets:install` that, as you mentioned, should be run by Composer already. But I am not sure the assets are supposed to be put in `public` directly (e.g. what if they need to be compiled from SASS/SCSS first?). – Kamafeather Dec 08 '19 at 00:14