symfony / webpack-encore-bundle

Symfony integration with Webpack Encore!
https://symfony.com/webpack-encore
MIT License
933 stars 83 forks source link

Unable to 'build' #193

Closed bricebou closed 1 year ago

bricebou commented 1 year ago

Hi,

On Ubuntu 20.04, I'm unable to build for production, even on a minimal project : I'm installing Symfony through

symfony new bibliogest --version="6.1.*" --webapp

Then, I simply install Encore :

symfony composer require encore

Then I install the dependencies :

yarn install

And, then I try to launch yarn build, without doing anything else... But I got that error :

yarn run v1.22.19
$ encore production --progress
Running webpack ...

99% done plugins FriendlyErrorsWebpackPlugin ERROR  Failed to compile with 2 errors                                                                                         23:30:57

 error  in app.94ae7874.css                                                                                                     23:30:57

app.94ae7874.css from Css Minimizer plugin
Error: Call retries were exceeded
    at ExperimentalWorker.initialize (/home/bricebou/DEV/perso/bibliogest/node_modules/css-minimizer-webpack-plugin/node_modules/jest-worker/build/workers/NodeThreadsWorker.js:153:21)
    at ExperimentalWorker._onExit (/home/bricebou/DEV/perso/bibliogest/node_modules/css-minimizer-webpack-plugin/node_modules/jest-worker/build/workers/NodeThreadsWorker.js:265:12)
    at Worker.emit (node:events:513:28)
    at Worker.[kOnExit] (node:internal/worker:279:10)
    at Worker.<computed>.onexit (node:internal/worker:199:20)

 error  in app.a5e8e6f2.css                                                                                                     23:30:57

app.a5e8e6f2.css from Css Minimizer plugin
Error: Call retries were exceeded
    at ExperimentalWorker.initialize (/home/bricebou/DEV/perso/bibliogest/node_modules/css-minimizer-webpack-plugin/node_modules/jest-worker/build/workers/NodeThreadsWorker.js:153:21)
    at ExperimentalWorker._onExit (/home/bricebou/DEV/perso/bibliogest/node_modules/css-minimizer-webpack-plugin/node_modules/jest-worker/build/workers/NodeThreadsWorker.js:265:12)
    at Worker.emit (node:events:513:28)
    at Worker.[kOnExit] (node:internal/worker:279:10)
    at Worker.<computed>.onexit (node:internal/worker:199:20)

Entrypoint app = runtime.61b1725c.js 826.2f103cc4.js app.a5e8e6f2.css app.1594675d.js
webpack compiled with 2 errors
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

I've tried with the latest version of NodeJS or the LTS version but the result is the same...

I've made some research and I've tried to increase the memory size for node with NODE_OPTIONS=--max-old-space-size=4096 but the outcome is the same...

Thanks in advance for any suggestion !

bricebou commented 1 year ago

Just found this issue : https://github.com/webpack-contrib/css-minimizer-webpack-plugin/issues/198

Just have to wait if I've understood well...

endelwar commented 1 year ago

I was bite by the same bug, forcing jest to version 29.1.2 fixed it. yarn add jest@^29.1.2 --dev

bricebou commented 1 year ago

Sorry for the noise ! Problem appears to be solved on the jest side !