Skip to content
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

Integrating React 17 Remote Entry MFE with Host Application React 18 #4251

Open
wsh92 opened this issue Aug 6, 2024 · 1 comment
Open

Integrating React 17 Remote Entry MFE with Host Application React 18 #4251

wsh92 opened this issue Aug 6, 2024 · 1 comment

Comments

@wsh92
Copy link

wsh92 commented Aug 6, 2024

Manifest file and remoteEntry.js files are loading in the host application but getting following runtime error while trying to load the child remote app using the router.

Element type is invalid. Received a promise that resolves to: undefined. Lazy element type must resolve to a class or function.
    at mountLazyComponent (webpack://host-app/./node_modules/react-dom/cjs/react-dom.development.js?:20037:9)
    at beginWork (webpack://host-app/./node_modules/react-dom/cjs/react-dom.development.js?:21627:16)
    at HTMLUnknownElement.callCallback (webpack://host-app/./node_modules/react-dom/cjs/react-dom.development.js?:4164:14)
    at Object.invokeGuardedCallbackDev (webpack://host-app/./node_modules/react-dom/cjs/react-dom.development.js?:4213:16)
    at invokeGuardedCallback (webpack://host-app/./node_modules/react-dom/cjs/react-dom.development.js?:4277:31)
    at beginWork$1 (webpack://host-app./node_modules/react-dom/cjs/react-dom.development.js?:27485:7)
    at performUnitOfWork (webpack://host-app/./node_modules/react-dom/cjs/react-dom.development.js?:26591:12)
    at workLoopConcurrent (webpack://host-app./node_modules/react-dom/cjs/react-dom.development.js?:26577:5)
    at renderRootConcurrent (webpack:/host-app./node_modules/react-dom/cjs/react-dom.development.js?:26539:7)
    at performConcurrentWorkOnRoot (webpack://host-app/./node_modules/react-dom/cjs/react-dom.development.js?:25772:38)

Host Application - React 18
Remote Child Application - React 17

I have used the following example to setup my project.
https://github.com/module-federation/module-federation-examples/tree/master/different-react-versions-16-18

@ScriptedAlchemy
Copy link
Member

Need to check this project again, E2E was failing

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants