plone / volto

React-based frontend for the Plone Content Management System
https://demo.plone.org/
MIT License
479 stars 649 forks source link

webpack bundle analyzer plugin crashes #2021

Closed tiberiuichim closed 3 years ago

tiberiuichim commented 3 years ago

I think we have to restrict it on the client entrypoint, right now it goes like this:

 env BUNDLE_ANALYZE=true yarn build                                                                                                                   11.54h  Thu 26 Nov 2020 08:55:26 AM UTC
yarn run v1.22.10
$ razzle build
Using .babelrc defined in your app root
Function only plugins are deprecated, use .modifyWebpackConfig
Using .babelrc defined in your app root
Function only plugins are deprecated, use .modifyWebpackConfig
Creating an optimized production build...
Compiling client...
Webpack Bundle Analyzer is started at http://0.0.0.0:8888
Use Ctrl+C to close it

Webpack Bundle Analyzer saved stats file to /home/tibi/work/volto/build/public/stats.json
events.js:174
      throw er; // Unhandled 'error' event
      ^

Error: listen EADDRINUSE: address already in use 127.0.0.1:8888
    at Server.setupListenHandle [as _listen2] (net.js:1280:14)
    at listenInCluster (net.js:1328:12)
    at doListen (net.js:1461:7)
    at process._tickCallback (internal/process/next_tick.js:63:19)
Emitted 'error' event at:
    at emitErrorNT (net.js:1307:8)
    at process._tickCallback (internal/process/next_tick.js:63:19)
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command

So it works, you can load it but then it crashes. After the first load you don't need the server process anymore, so it's easy to miss this.

tiberiuichim commented 3 years ago

Fixed in master