我正在学习symfony奏鸣曲包,我使用composer create-project symfony/website-skeleton sonata
命令安装了symfony骨架项目,然后进入sonata目录并在symfonydoc上运行composer require sonata-project/admin-bundle
命令作为指导,我按照文档所述检查所有配置,并且cache:clear
和assets:install
命令都可以正常工作,我使用php bin/console server:start
启动服务器,但是当我访问URL'http://localhost:8000/admin/dashboard时'它报告错误,An exception has been thrown during the rendering of a template ("Asset manifest file "/Users/kazuma/www/sonata/public/build/manifest.json" does not exist.").
我以前使用symfony进行项目,但是我对webpack不太了解,我的资产目录为空,当我运行npm install时,它也可以正常工作,我也不知道我错过了什么。 / p>
答案 0 :(得分:0)
在Symfony 4中
{
"bundles": {
"Sonata\\AdminBundle\\SonataAdminBundle": ["all"]
},
"copy-from-recipe": {
"config/": "%CONFIG_DIR%/",
"src/": "%SRC_DIR%/"
}
}