The loadShareSync function was unable to load react-dom. The react-dom could not be found in host #1959
-
Beta Was this translation helpful? Give feedback.
Replies: 6 comments 11 replies
-
What are you using. What's the stack? |
Beta Was this translation helpful? Give feedback.
-
Hi everyone!, i am experiment the same error , my project uses the following stack
when I run the project with npm run dev everything works without problems, when I run npm run build, and then npm run start in a productive environment, the error appears. React does not load, therefore the app displays only static content but it does not work. I hope to have contributed to the project and I am willing to perform the necessary tests to help fix the error. |
Beta Was this translation helpful? Give feedback.
-
Eager consumption error. Do you have dynamic import in entry to bootstrap application |
Beta Was this translation helpful? Give feedback.
-
Hello, this demo may help you. You can solve this problem by copying the contents of the original entry file to a file named
import React from 'react';
import ReactDOM from 'react-dom/client';
import App from './app';
ReactDOM.createRoot(document.getElementById("root") as HTMLElement).render(
<React.StrictMode>
<App />
</React.StrictMode>,
);
import("./bootstrap"); |
Beta Was this translation helpful? Give feedback.
-
Hello! I'm facing the same problem with the import App, { AppContext } from 'next/app';
import 'next/dynamic';
function MyApp({ Component, pageProps }) {
return <Component {...pageProps} />;
}
MyApp.getInitialProps = async (ctx: AppContext) => {
const appProps = await App.getInitialProps(ctx);
return appProps;
};
export default MyApp; The versions I'm using are these: "dependencies": {
"@emotion/react": "^11.7.0",
"@emotion/styled": "^11.0.0",
"@module-federation/nextjs-mf": "8.3.12",
"@module-federation/typescript": "3.1.1",
"next": "13.5.6",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"webpack": "^5.91.0",
}, I keep getting this: |
Beta Was this translation helpful? Give feedback.
-
We are ending support for Next.js #3153 |
Beta Was this translation helpful? Give feedback.
Put a get initial props or something in _app otherwise it's just ssg and probably won't work well