-
Notifications
You must be signed in to change notification settings - Fork 26.8k
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: Error: Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: object. #68012
Comments
For me I had to revert back to v.14.2.7. I dont use MUI but have similar issue |
Same here, until version
I tried to check the log but it is impossible to figure out what is wrong and where
|
Link to the code that reproduces this issue
https://github.com/jrjake/nextjs-mui-bug
To Reproduce
"type": "module"
specified along with latest Next.js stable (14.2.5) and Material UI version (5.16.4)npm run dev
.Current vs. Expected behavior
When I console.log(the component), I get {} when "type": "module", but I get [Function (anonymous)] as expected when running without "type": "module". The expected behavior is that Next.js will not throw an error in this scenario.
Provide environment information
Operating System: Platform: linux Arch: x64 Version: #1 SMP PREEMPT_DYNAMIC Thu Jul 11 19:29:01 UTC 2024 Available memory (MB): 30006 Available CPU cores: 8 Binaries: Node: 20.12.2 npm: 10.8.2 Yarn: N/A pnpm: N/A Relevant Packages: next: 14.2.5 // Latest available version is detected (14.2.5). eslint-config-next: N/A react: 18.2.0 react-dom: 18.2.0 typescript: N/A Next.js Config: output: N/A
Which area(s) are affected? (Select all that apply)
Not sure
Which stage(s) are affected? (Select all that apply)
next dev (local), next build (local)
Additional context
I had previously reported this bug as #63394, which was claimed to be fixed in 14.2.3 but it appears that maybe a separate issue was fixed that was unrelated to my initial bug report. This issue does not appear in 14.3.0-canary.9. I attempted to test this with the latest 14.3 and 15.0 canary, but MUI does not claim support for React 19 yet.
The text was updated successfully, but these errors were encountered: