Error after switching from Webpack Encore to AssetMapper: "Asset manifest file does not exist"

44 Views Asked by At

After installing AssetMapper and removing Webpack Encore in Symfony 7.0, I'm now getting this error:

An exception has been thrown during the rendering of a template ("Asset manifest file "/.../public/build/manifest.json" does not exist. Did you forget to build the assets with npm or yarn?").

It's reported at this line in my base.html.twig:

{% block importmap %}{{ importmap('app') }}{% endblock %}
1

There are 1 best solutions below

0
Thomas Landauer On

It's coming from the json_manifest_path setting somewhere in your config/ folder (probably config/packages/assets.yaml or config/packages/framework.yaml).

Solution: Just delete that setting :-)