webpack-contrib / webpack-bundle-analyzer

Webpack plugin and CLI utility that represents bundle content as convenient interactive zoomable treemap
MIT License
12.53k stars 479 forks source link

bump sirv to fix analyzerMode server #611

Closed panbenson closed 10 months ago

panbenson commented 10 months ago

i'm unable to start webpack-bundle-analyzer@4.9.0 in 'server' mode with the following traceback:

node_modules/webpack-bundle-analyzer/lib/viewer.js:89
      sirvMiddleware(req, res);
      ^
TypeError: parser is not a function
    at node_modules/webpack-bundle-analyzer/node_modules/sirv/build.js:163:30
    at Server.<anonymous> (node_modules/webpack-bundle-analyzer/lib/viewer.js:89:7)
    at Server.emit (node:events:513:28)
    at Server.emit (node:domain:489:12)
    at parserOnIncoming (node:_http_server:1068:12)
    at HTTPParser.parserOnHeadersComplete (node:_http_common:117:17)

it appears to be related to sirv, and a fix for this issue (https://github.com/lukeed/sirv/issues/124) was released in ^2.0.0. i've confirmed adding a resolution for this package lets me boot webpack-bundle-analyzer in 'server' mode on my project.

also ran npm test locally with these changes

linux-foundation-easycla[bot] commented 10 months ago

CLA Signed

The committers listed above are authorized under a signed CLA.

panbenson commented 10 months ago

@valscion added an entry in the changelog, let me know if that works!

valscion commented 10 months ago

Released in v4.9.1 now ☺️. Thank you for your contributions!