'Could not find the entrypoints file from Webpack: the file ".../public/build/entrypoints.json" does not exist
I'm trying to setup a symfony project i cloned from github, i'm new to setting up symfony and need help. I've done composer install but it won't come up with the webpage. It says it couldn't find the entrypoints
I've tried composer install, npm and not much else, as i'm new to symfony
The code it gives me with the error:
<head>
<meta charset="UTF-8">
<title>{% block title %}CargoFM{% endblock %}</title>
{% block stylesheets %}
{{ encore_entry_link_tags('app') }}
{% endblock %}
</head>
<body>
{% block body %}{% endblock %}
{% block javascripts %}
{{ encore_entry_script_tags('app') }}
{% endblock %}
</body>
</html>
It's probably a really small issue
Full error message: An exception has been thrown during the rendering of a template ("Could not find the entrypoints file from Webpack: the file "C:\laragon\www\cargofm/public/build/entrypoints.json" does not exist.").
Don't know what to do
Solution 1:[1]
I had the same issue!
type this cmd : yarn encore dev --watch
Then run your server and everything should be fine.
Solution 2:[2]
It seems your entrypoints.json has not generated by encore.
Do verify your webpack.config.js
setup correctly(it will be present at root). Like
// webpack.config.js
var Encore = require('@symfony/webpack-encore');
Encore
// directory where compiled assets will be stored
.setOutputPath('public/build/')
// public path used by the web server to access the output path
.setPublicPath('/build')
.addEntry('app', './assets/js/app.js')
// ...
;
// ...
Then try run yarn encore dev --watch
Here you can follow for setting up project instructions.
https://symfony.com/doc/current/frontend/encore/simple-example.html
Solution 3:[3]
I had the same problem and I deleted {{ encore_entry_link_tags('app') }}
from the head and body and it works good.
Solution 4:[4]
I had the same problem and forgot to type the install command for bootstrap:
yarn add bootstrap --dev
Did you type this command?
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|---|
Solution 1 | |
Solution 2 | |
Solution 3 | Dharman |
Solution 4 | Cedric-J. |