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
TypeError: Cannot read property 'jsonData' of undefined #13691
Comments
I had this problem just now, deps. is "@pmmmwh/react-refresh-webpack-plugin": "^0.4.3", simple page is work fine , but when real project building process will crashes. first building is work fine , second time is crashed |
Please provide reproducible test repo |
I try to revert webpack version to 5.38.0. project works fine! I should more time to provide reproducible test repo.because project files is too many..I haven't figured out what caused the error |
If you need fix ASAP, please provide, bug I think bug somewhere else |
@alexander-akait There is my reproduction repo for the issue. I managed to narrow down the bug to using only one external package |
Critical |
While waiting... I did a little "scripts": {
"preinstall": "npx npm-force-resolutions",
},
"devDependencies": {
...
},
"resolutions": {
"webpack": "5.40.0"
}, Then run |
@raduchiriac I get this error in StoryBook, running webpack 5.39.1 - 5.41.1. Tried your fix and no luck. |
Running into the same issue, switching to 5.41.0 doesn't resolve issue. node version v12.x Works when building to a system module directly from webpack compiler, but fails in fresh storybook running webpack 5 |
I have the exact same issue. npm 7.7.6 |
@TerrySlack I used that very snippet inside a storybookjs project myself. Make sure you only have webpack inside the |
I try to revert webpack version to 5.41.1. project works fine! |
We will fix it in near future, sorry |
I have the same issue, when importing avj (json-schema library) and running webpack with Setting |
@raduchiriac @dgb23 This worked. I don't have a webpack.config.js for Storybook, but I made an entry in main.js in the webpackFinal method setting config.cache = false; And it works. Thanks for this. I spent a lot of time trying various suggestions and only this one worked. |
@alexander-akait |
This worked. Thanks @dgb23 & @TerrySlack
|
I'm having this bug, too. Here are some information from my side. Maybe it helps to find the issue. This is the error I get, when it happens:
This is the content of the file
Actually it happens every second edit of my code. |
Cool |
⁸ |
Please excuse that the bug report is quite short. I don't have time to debug the problem myself today. Since the bug doesn't come from other dependencies according to the stacktrace and the only change since the last usage is in the webpack version, I post the bug report anyway.
Bug report
What is the current behavior?
The build process crashes when watching for changes. The first build works fine, on saving a file, the process throws the folloging error.
If the current behavior is a bug, please provide the steps to reproduce.
I will update the instructions to reproduce the error next week if necessary.
What is the expected behavior?
module.buildInfo
seems to be undefined, although it shouldn't be. When I replace the line withlet data = module?.buildInfo?.jsonData;
it works fine but I don't think this would be a good solution.Other relevant information:
webpack version: 5.42.0 throws the error. 5.41.0 seems to be working
Node.js version: v16.4.0, v12.x of my coworker didn't work aswell
Operating System: Windows
Additional tools: Custom CLI with embedded webpack.
The text was updated successfully, but these errors were encountered: