@module-federation/nextjs-mf and NextJs Error: TypeError: Cannot read properties of null (reading 'fn') #2211
Replies: 2 comments
-
I think this problem can be better solved through the issue, so that we can further promote and follow up, thank you ~ |
Beta Was this translation helpful? Give feedback.
0 replies
-
I got similar issue. Any fix for this? |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
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:
.env:
NEXT_PRIVATE_LOCAL_WEBPACK=true
_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!
Beta Was this translation helpful? Give feedback.
All reactions