简体   繁体   中英

EasyAdminBundle doesn't load assets

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: 我的网站没有资产

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

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?

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM