Symfony Webpack: Could not find the entrypoints file from Webpack Symfony Webpack: Could not find the entrypoints file from Webpack symfony symfony

Symfony Webpack: Could not find the entrypoints file from Webpack


Update your version constraint in package.json for @symfony/webpack-encore to ^0.21.0

..."devDependencies": {    "@symfony/webpack-encore": "^0.21.0",...

add .enableSingleRuntimeChunk() to your webpack.config.js

....addEntry('app', './assets/js/app.js')//     .addEntry('js/app', './assets/js/app.js')//     .addStyleEntry('css/app')//     .addStyleEntry('css/app', './assets/css/app.scss').enableSingleRuntimeChunk()...

Then run yarn upgrade or yarn install

PS: If you have symfony/webpack-encore-bundle installed, you can remove symfony/webpack-encore-pack

composer remove symfony/webpack-encore-pack


In case somebody is running into a similar issue on staging or production servers: Make sure the asset build is run in the deployment process. On Heroku, for example, you need to use a postinstall script.

{    "devDependencies": {        "@fortawesome/fontawesome-free": "^5.5.0",        "@symfony/webpack-encore": "^0.22.0",        "webpack-notifier": "^1.6.0"    },    "license": "UNLICENSED",    "private": true,    "scripts": {        "dev-server": "encore dev-server",        "dev": "encore dev",        "watch": "encore dev --watch",        "postinstall": "encore production --progress" // executed during deployment to Heroku    },    "dependencies": {        "bootstrap": "^4.1.3",        "fontawesome": "^4.7.2",        "jquery": "^3.3.1",        "node-sass": "^4.10.0",        "popper.js": "^1.14.6",        "sass-loader": "^7.1.0"    }}