-
Notifications
You must be signed in to change notification settings - Fork 20
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
BUG: Webpack stats object failing type validation (Cannot load module/asset sizes.
)
#110
Comments
Is there any chance that you could create a minimal reproduction for this error in a public repository with install + running instructions? Alternatively, if a private project, you could create a full stats object with something like: const { StatsWriterPlugin } = require("webpack-stats-plugin");
module.exports = {
// ...
plugins: [
new StatsWriterPlugin({
fields: ["assets", "modules"]
})
]
}; in your webpack config, and go through and manually replace all of the Offhand, it looks like the webpack stats object violates inspectpack's type shape, and I'm really curious as to what the stats object looks like / what's going on. Thanks!!! |
I'm going to do what I can. It's a pretty large, private project and my webpack-foo is lacking, but I love creating problems that get people curious and want to help find a solution! I will say as I address from a couple of different sides, this seems to stem from something the |
OK, I think this is what you're looking for 🤞 https://gist.github.com/westbrook-asapp/a39ea69aece0413e99ea57c6a5783c1f Let me know how else I can support tracking down a resolution to this! |
Thanks @westbrook-asapp ! Given the size of that beast, I appreciate the effort it must have taken to get that in workable shape to post here. I am able to suck that into |
Cannot load module/asset sizes.
)
First issue: {
"id": 4,
"identifier": "/PATH/TO/node_modules/prop-types/index.js",
"name": "./node_modules/prop-types/index.js",
"index": 478,
"index2": 475,
"size": 1078,
"cacheable": true,
"built": true,
"optional": false,
"prefetched": false,
"chunks": [
null,
null,
null,
null,
2,
4,
7,
8,
9
],
// ... snipped ...
}, |
- Expand type to allow `null` and handle in code. Fixes #110 - Add regression tests.
I'm making the jump from v0.4.0 to ^3.0.0 and when I run my application I get the following display where the application is built, but the module/asset sizes (and problems when available) are blocked from display due to errors. I checked into some similar issues (e.g. #182) in other posts, but most of them discuss development in dependencies like
inspectpack
, etc. that have since completed, so I'm at a loss.While webpack is kind of new to me, I'm pretty comfortable saying that the below config is a bit expansive so please let me know what additional or focused information I could supply to help track this issue down. Thanks!
====================================================================
If the issue is visual, please provide screenshots here
====================================================================
Steps to reproduce the problem
====================================================================
Please provide a gist of relevant files
Entry script:
webpack.config.js
====================================================================
More Details
echo $TERM
? xterm-256colorThe text was updated successfully, but these errors were encountered: