-
-
Notifications
You must be signed in to change notification settings - Fork 9.4k
Uncaught TypeError: Cannot read properties of undefined (reading 'call') #15582
Description
Bug report
What is the current behavior?
Can't have same package.json name on host and remote. Getting error at some point using module federation, guessing when splitChunks kicks in.
If the current behavior is a bug, please provide the steps to reproduce.
Set host's and remote's name in package.json to same value. Try to load a remote page large enough to trigger splitting chunks (again guessing).
What is the expected behavior?
Should not result in error, or, provides a better error message
Other relevant information:
-
Similar experience as @ydmitry in issue 12964 where there is a point that adding a single line of code to a React component's render method results in the error, and removing the line clears the error. Line was a simple MUI which already appears multiple times in the component.
-
Same as @ydmitry setting splitChunks = false on remote resolved the error
-
Ran across another report of the error https://discourse.aurelia.io/t/aurelia-1-and-webpack-module-federation-plugin-different-package-json-names/4398 which suggested the error occurred when the package.json names were different and setting them to the same name resolved the error.
-
On checking my package names, found they were the same. Removed splitChunks = false, verified error was present again, changed package names to be different, and error was gone.
I'm fine for now. Hope this helps someone else struggling with this error.
webpack version:
Node.js version:
Operating System:
Additional tools: