Cannot read properties of undefined (reading 'init') #3176
Replies: 2 comments
-
In your remote config:
In your host loadComponent you try to resolve 'myAppRemoteEntry' instead of the exposed name in your remote config, I believe this is where your issue is.
|
Beta Was this translation helpful? Give feedback.
0 replies
-
Use our runtime package https://module-federation.io/guide/basic/runtime.html |
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
-
I'm new to module federation, I got this error Cannot read properties of undefined when reading 'init'. I provided configurations below which I kept.
This is the config of remote app(this app should act as both remote and host)
Host app config
In host app i loaded
remoteEntry-0.1.0.js
dynamicallyFrom the remote app if I keep
runtimeChunk: false
and withoutsplitChunks
it is working fine.If I keep
runtimeChunk: single
andsplitChunks
thenCannot read properties of undefined (reading 'init')
error is raised at the lineawait container.init(__webpack_share_scopes__.default)
from the above code.what might be the issue?
Beta Was this translation helpful? Give feedback.
All reactions