@module-federation/nextjs-mf and NextJs Error: TypeError: Cannot read properties of null (reading 'fn') #2461
Closed
5 tasks done
Labels
nextjs-mf
nextjs-mf package identifier
Describe the bug
Hello everyone,
I've encountered a persistent error over the past few months that intermittently appears across my set of MFEs (Micro Frontends). Unfortunately, I'm struggling to provide specific details about this error. However, I've created a simplified demo to illustrate the issue:
next.config.js
packge.json:
_app.tsx:
--
On "npm run dev" command, I get an error and therefore it won't even start the application. Only solved by removing the NextFederationPlugin from the next.config.js.
Complete log of the error bellow:
TypeError: Cannot read properties of null (reading 'fn')
at C:\Users\hiran\Documents\Projects\POCs\mfe_2\node_modules\next\dist\compiled\webpack\bundle5.js:13:29685
at Array.map ()
at AsyncSeriesHookCodeFactory.setup (C:\Users\hiran\Documents\Projects\POCs\mfe_2\node_modules\next\dist\compiled\webpack\bundle5.js:13:29675)
at Hook.COMPILE [as compile] (C:\Users\hiran\Documents\Projects\POCs\mfe_2\node_modules\next\dist\compiled\webpack\bundle5.js:13:24094)
at Hook._createCall (C:\Users\hiran\Documents\Projects\POCs\mfe_2\node_modules\next\dist\compiled\webpack\bundle5.js:13:26635)
at Hook.CALL_ASYNC_DELEGATE (C:\Users\hiran\Documents\Projects\POCs\mfe_2\node_modules\next\dist\compiled\webpack\bundle5.js:13:25988)
at run (C:\Users\hiran\Documents\Projects\POCs\mfe_2\node_modules\next\dist\compiled\webpack\bundle5.js:28:140498)
at Compiler.run (C:\Users\hiran\Documents\Projects\POCs\mfe_2\node_modules\next\dist\compiled\webpack\bundle5.js:28:140794)
at compilerWithCallback (C:\Users\hiran\Documents\Projects\POCs\mfe_2\node_modules@module-federation\nextjs-mf\src\plugins\ChildFederationPlugin.js:228:39)
at C:\Users\hiran\Documents\Projects\POCs\mfe_2\node_modules@module-federation\nextjs-mf\src\plugins\ChildFederationPlugin.js:250:17
--
Tnx in advance for any help!
Reproduction
none
Used Package Manager
npm
System Info
Validations
The text was updated successfully, but these errors were encountered: