-
-
Notifications
You must be signed in to change notification settings - Fork 32.4k
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
[material-ui][v4] You are importing createRoot from "react-dom" which is not supported. #44983
Comments
@jay-fleapo Material UI v4 ( Also, from:
It looks like you have React If possible, I would suggest from Material v4 to v5 or even v6. If this is not possible, I would suggest using React 17 and its matching types package. |
I have next 15 above version and I have to use react 19 are you telling me
to use types 19.0.0 as well
…On Thu, 9 Jan, 2025, 8:35 pm Diego Andai, ***@***.***> wrote:
@jay-fleapo <https://github.com/jay-fleapo> Material UI v4 (
@material-ui/core) doesn't support React 18 or 19.
Also, from:
.***@***.******@***.******@***.******@***.******@***.******@***.******@***.*** <https://github.com/material-ui+core@***@***.******@***.******@***.******@***.******@***.******@***.***>
It looks like you have React 19.0.0 installed with mismatching React
Types version 18.3.12.
If possible, I would suggest from Material v4 to v5 or even v6. If this is
not possible, I would suggest using React 17 and its matching types package.
—
Reply to this email directly, view it on GitHub
<#44983 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/A3SW4ADWLU6BIBQEG3BHISL2J2F5PAVCNFSM6AAAAABU4LOBXGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDKOBQGUYTAMRTG4>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
@jay-fleapo you have React I don't recommend using Material UI v4 with React 19, as it's not supported. |
Steps to reproduce
Description:
I have encountered an issue in the Material-UI package where the findDOMNode function is being imported from "react-dom". This function is not exported from react-dom in the current version of React, leading to an import error.
Details:
File Path: ../../node_modules/.pnpm/@material-ui+core@4.12.4_@types[email protected][email protected][email protected][email protected]/node_modules/@material-ui/core/esm/Unstable_TrapFocus/Unstable_TrapFocus.js
Error Message: Attempted import error: 'findDOMNode' is not exported from 'react-dom' (imported as 'ReactDOM').
Steps to Reproduce:
Install Material-UI version 4.12.4 in a project using React 18.
Attempt to use components that rely on Unstable_TrapFocus.
Observe the import error related to findDOMNode.
Current behavior
The import of findDOMNode from react-dom results in an error, preventing the application from functioning as expected.
Expected behavior
The findDOMNode function should be handled in a way that is compatible with React 18, possibly by avoiding its use or by using alternative methods that do not rely on deprecated APIs.
Context
You are importing createRoot from "react-dom" which is not supported. You should instead import it from "react-dom/client".
Your environment
npx @mui/envinfo
Search keywords: You are importing createRoot from "react-dom" which is not supported. You should instead import it from "react-dom/client".
The text was updated successfully, but these errors were encountered: