Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Document webpack-dev-server interplay only displaying stat sizes #191

Closed
valscion opened this issue Jun 15, 2018 · 6 comments
Closed

Document webpack-dev-server interplay only displaying stat sizes #191

valscion opened this issue Jun 15, 2018 · 6 comments

Comments

@valscion
Copy link
Member

valscion commented Jun 15, 2018

The closed issue #147 has some valuable comments about webpack-bundle-analyzer only showing stat sizes when bundle output does not go to the filesystem.

It would be valuable to document this caveat in the README.md.

This contribution opportunity has been seized by @fanich37

Please avoid creating competing pull requests


Here's some background from the linked issue:

@jeron-diovis in #147 (comment)

Just ran into this issue using analyzer with webpack-dev-server. No angular or things like this.

The problem is that analyzer uses physical files to calc parsed/gzipped sizes – while webpack-dev-server keeps everything in memory.

Second problem is that being used as plugin, analyzer shows no errors, while CLI tools says Couldn't parse bundle asset.

As I understand, there is nothing analyzer can do with webpack-dev-server, but maybe it's worth to explicitly mention in docs that you should have files on disc to get parsed/gzipped info?

@Macil in #147 (comment)

I was using webpack with gulp and compiler.outputFileSystem = new MemoryFS(); so that webpack wouldn't write the bundles itself, so I ran into the same issue as @jeron-diovis. The BundleAnalyzerPlugin didn't report any errors at all in the console, just silently produced stat-sized-only reports. I had to use webpack-bundle-analyzer on the command line on the profile json in order to see any kind of error message, which I only thought to do because of this thread.

@fanich37
Copy link
Contributor

fanich37 commented Dec 4, 2018

Hi, @valscion . May I take this one?

@valscion
Copy link
Member Author

valscion commented Dec 4, 2018

Sure! 👍

fanich37 added a commit to fanich37/webpack-bundle-analyzer that referenced this issue Dec 5, 2018
@th0r th0r closed this as completed in #231 Dec 10, 2018
th0r added a commit that referenced this issue Dec 10, 2018
@Knogobert
Copy link
Contributor

This should perhaps be updated in the docs to the current error string, which (for me) is:

Error parsing bundle asset "your_bundle_name.bundle.js": no such file
No bundles were parsed. Analyzer will show only original module sizes from stats file.

Rather than the outdated:

Couldn't parse bundle asset "your_bundle_name.bundle.js".
Analyzer will use module sizes from stats file.

If I'm not mistaken.

@valscion
Copy link
Member Author

Hmm yeah, makes sense. Feel free to open a PR to change the docs.

I wonder when the outdated text was changed, or whether it comes from some other place in the code that I now don't recall...

@Knogobert Knogobert mentioned this issue Oct 4, 2021
@kanishk30
Copy link

kanishk30 commented Nov 23, 2021

I am facing similar issues. I can only see Stat after running bundle analyser.
Screenshot 2021-11-23 at 7 16 44 PM

Just adding following line makes it happen,
'react-dates/lib': 'react-dates/esm'

 resolve: {
      modules: [path.resolve(__dirname), 'node_modules'],
      alias: {
        ....
        'react-dates/lib': 'react-dates/esm'
      },

If I remove this line, I am able to see all three ( Stat, Parse, Gzipped)

Logs


Error parsing bundle asset "/Users/kanishk.agrawal/workspace/sp-seller-dashboard/client/dist/bundles/listings.ca000d74c8c3d444f5bb.js": no such file
Error parsing bundle asset "/Users/kanishk.agrawal/workspace/sp-seller-dashboard/client/dist/bundles/383.c4f37401fce0d5d17251.js": no such file
Error parsing bundle asset "/Users/kanishk.agrawal/workspace/sp-seller-dashboard/client/dist/bundles/513.3ee8770c259eb4dc40d3.js": no such file
Error parsing bundle asset "/Users/kanishk.agrawal/workspace/sp-seller-dashboard/client/dist/bundles/fa.6912da9faf08c2443762.js": no such file
Error parsing bundle asset "/Users/kanishk.agrawal/workspace/sp-seller-dashboard/client/dist/bundles/9532.08fdeb4bb3242bf5dd03.js": no such file
Error parsing bundle asset "/Users/kanishk.agrawal/workspace/sp-seller-dashboard/client/dist/bundles/476.aa246cd3d41a38e57f5a.js": no such file
Error parsing bundle asset "/Users/kanishk.agrawal/workspace/sp-seller-dashboard/client/dist/bundles/6350.cc4d2249c16bac0b5c7f.js": no such file
Error parsing bundle asset "/Users/kanishk.agrawal/workspace/sp-seller-dashboard/client/dist/bundles/289.8b1937750209e918ca5e.js": no such file
Error parsing bundle asset "/Users/kanishk.agrawal/workspace/sp-seller-dashboard/client/dist/bundles/promotions.c1ddfa1417ee87b1e8e7.js": no such file
Error parsing bundle asset "/Users/kanishk.agrawal/workspace/sp-seller-dashboard/client/dist/bundles/238.64dc60aa00b757923af9.js": no such file
Error parsing bundle asset "/Users/kanishk.agrawal/workspace/sp-seller-dashboard/client/dist/bundles/5639.93c6c9816b101f4d2f57.js": no such file
Error parsing bundle asset "/Users/kanishk.agrawal/workspace/sp-seller-dashboard/client/dist/bundles/397.fa964c3bde40237bcda9.js": no such file
Error parsing bundle asset "/Users/kanishk.agrawal/workspace/sp-seller-dashboard/client/dist/bundles/953.d0fb03309efcbc95434b.js": no such file
Error parsing bundle asset "/Users/kanishk.agrawal/workspace/sp-seller-dashboard/client/dist/bundles/fbflite.4b58541d0a3fa775ba92.js": no such file
Error parsing bundle asset "/Users/kanishk.agrawal/workspace/sp-seller-dashboard/client/dist/bundles/850.5cab811dc87b85c165b9.js": no such file
Error parsing bundle asset "/Users/kanishk.agrawal/workspace/sp-seller-dashboard/client/dist/bundles/546.ddc0bda42bcd377f330d.js": no such file
Error parsing bundle asset "/Users/kanishk.agrawal/workspace/sp-seller-dashboard/client/dist/bundles/app.c5465342fad49a75af26.js": no such file
Error parsing bundle asset "/Users/kanishk.agrawal/workspace/sp-seller-dashboard/client/dist/bundles/9072.e6be74f73f8427a09579.js": no such file
Error parsing bundle asset "/Users/kanishk.agrawal/workspace/sp-seller-dashboard/client/dist/bundles/partnerServices.9e9d449061b978da4aeb.js": no such fil

May I know how can it be fixed?

@valscion
Copy link
Member Author

Please open a new issue and fill the issue template.

@webpack-contrib webpack-contrib locked as resolved and limited conversation to collaborators Nov 23, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants