module-federation / module-federation-examples

Implementation examples of module federation , by the creators of module federation
https://module-federation.io/
MIT License
5.56k stars 1.74k forks source link

[Bug][Nextjs13] Uncaught TypeError: Cannot read properties of undefined (reading 'consumes') #3803

Closed gjndual closed 5 months ago

gjndual commented 6 months ago

I am getting error while running the module federation sample application https://github.com/module-federation/module-federation-examples/tree/master/nextjs-v13

when try to access Home app: http://localhost:3001/ on local (npm run dev) the error appear in chrome browser console:

webpack.js?ts=1712024559181:1613 Uncaught TypeError: Cannot read properties of undefined (reading 'consumes') at __webpack_require__.f.consumes (webpack.js?ts=1712024559181:1613:59) at react-refresh.js?ts=1712024559181:60:94 at webpackJsonpCallback (webpack.js?ts=1712024559181:2180:39) at Array.forEach (<anonymous>) at webpack.js?ts=1712024559181:2194:31 at webpack.js?ts=1712024559181:2196:12 at webpack.js?ts=1712024559181:2218:12

note: Try to run in build version (npm run build + npm run start) it works normally, the issue appear only on local (npm run dev)

ScriptedAlchemy commented 5 months ago

Try it now, i merged a new update

gjndual commented 5 months ago

@ScriptedAlchemy It is working perfect now, thank you