ReferenceError: Cannot access uninitialized variable when loading remote #3842
Unanswered
ArmenKakosyan
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I have multiple React/Vite apps, and one called App Shell which is the hose of all of the module federated apps. Based on the route of the page I am loading a remote app using
loadRemote
function from@module-federation/runtime
(the same thing happens when i use@module-federation/enhanced/runtime
). This what my code looks like:Everything works fine on Chrome/FF, but when I am using Safari I mostly get this error and the page crashes. For other times (rarely) the page loads successfully. Here is my error. I do not have much info about it.
What can cause this issue, and is there a solution for this?
If my component uses jsx:
<div>Test</div>
, it crashes, if I useReact.createElemet('div', null, 'Test')
it renders successfully.Beta Was this translation helpful? Give feedback.
All reactions