You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
After installing Encore, you might see the following error when running tests
177
+
locally or on your Continuous Integration server:
177
178
178
179
.. code-block:: text
179
180
180
-
Uncaught PHP Exception Twig\Error\RuntimeError: "An exception has been thrown during the rendering of a template ("Could not find the entrypoints file from Webpack: the file "/var/www/html/public/build/entrypoints.json" does not exist.
181
+
Uncaught PHP Exception Twig\Error\RuntimeError:
182
+
"An exception has been thrown during the rendering of a template
183
+
("Could not find the entrypoints file from Webpack:
184
+
the file "/var/www/html/public/build/entrypoints.json" does not exist.
181
185
182
-
..
183
-
184
-
This is happening because you did not build your encore assets, hence no ``entrypoints.json`` file. Plus encore is working in strict mode by default, which causes twig functions ``encore_entry_*`` to panic.
185
-
186
-
To solve that you can add this to your ``config/packages/test/webpack_encore.yaml``
186
+
This is happening because you did not build your Encore assets, hence no
187
+
``entrypoints.json`` file. To solve this error, either build Encore assets or
188
+
set the ``strict_mode`` option to ``false`` (this prevents Encore's Twig
189
+
functions to trigger exceptions when there's no ``entrypoints.json`` file):
0 commit comments