-
Notifications
You must be signed in to change notification settings - Fork 28
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
React.createElement: type is invalid in Next.js 13 #125
Comments
@jedwards1211 Is this something you're able to look into? I tried digging into it earlier this week, but wasn't able to make much headway. |
Sorry for the delay, yes I'll look into it today |
Ugh this is a nasty and complicated webpack module resolution issue. Next appears to set this module alias by default:
I think I should probably file a bug in Next.js about this, but I'm still trying to investigate why they did this in the first place. For me this config tweak worked around the issue...hopefully it doesn't break anything for you? /** @type {import('next').NextConfig} */
const nextConfig = {
webpack: (config) => {
if (config.resolve.alias) delete config.resolve.alias["@mui/material$"];
return config;
},
};
module.exports = nextConfig; |
Really don't know the best way to solve that issue with Next.js' default config so I just implemented a workaround in this package...should get released soon |
🎉 This issue has been resolved in version 5.0.10 🎉 The release is available on: Your semantic-release bot 📦🚀 |
I'm getting this warning and Internal error into Next 13:
Warning: React.createElement: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: object. at HoverMenu (webpack-internal:///(ssr)/./node_modules/material-ui-popup-state/es/HoverMenu.mjs:17:16) at MenuButtons (webpack-internal:///(ssr)/./src/components/global/menu-buttons.tsx:19:24)
The text was updated successfully, but these errors were encountered: