Skip to content

Commit c58d741

Browse files
committed
Tweaks
1 parent f1ac0b1 commit c58d741

File tree

1 file changed

+14
-10
lines changed

1 file changed

+14
-10
lines changed

frontend/encore/faq.rst

Lines changed: 14 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -170,23 +170,27 @@ running it (e.g. when executing ``yarn encore dev``). Fix this issue calling to
170170
171171
.. _`Webpack integration in PhpStorm`: https://www.jetbrains.com/help/phpstorm/using-webpack.html
172172

173-
My functional tests are failing in CI
174-
-------------------------------------
173+
My Tests are Failing Because of ``entrypoints.json`` File
174+
---------------------------------------------------------
175175

176-
With something along the lines of
176+
After installing Encore, you might see the following error when running tests
177+
locally or on your Continuous Integration server:
177178

178179
.. code-block:: text
179180
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.
181185
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):
187190

188191
.. code-block:: yaml
189192
193+
# config/packages/test/webpack_encore.yaml
190194
webpack_encore:
191195
strict_mode: false
192-
..
196+
# ...

0 commit comments

Comments
 (0)