-
-
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
MUI throwing error in Nextjs #39145
Comments
Duplicate of #39093 |
Just FYI, these are warnings and build should not fail with this. Also, closing as duplicate. |
I agree, that this is an Warning, and not an error n should not fail the build. but why in the latest version of MUI this warning is thrown? |
It's actually logging warning with the latest version of next js, not with MUI. There's no warning if you use the latest 13.4.x version. So we'll have to debug if this needs to be fixed in MUI or not. |
it's the Version of Nextjs but with Pages Router, not the App Router. and the Nextjs version I am using is Yes, possible that warning is thrown by Nextjs, but something is there in MUI, because if I don't have the MUI packages, then the error is not thrown at all... |
See this comment. Also, like I earlier pointed, these are warnings and not error. So you can continue your development till this is fixed either in MUI or Next.js |
but @brijeshb42 where I am mentioning that it's an Error? |
You mentioned in your previous comment - |
as nowhere I am stating that it's an error, I agreed that it's an warning, but the warning is of MUI, not of Nextjs, that's what I am conveying... also in my above comment, I mentioned that I tried to build the nextjs without MUI then there's no warning at all, but when MUI is there, even the small code, it's giving warnings |
I'm Sorry, but it's an typo |
Can you check if you are importing |
let me try this scenario & get back to you |
@brijeshb42 -- in the currently code which I mentioned, at no where I am using the |
in other Project, I tried the way you mentioned, but still the warning is there |
and also, I am using the TypeScript with Nextjs Page Router @brijeshb42 |
Error:
Expected Behavior
this error shouldn't come when we're building the
npm run build
Also, I've not wrapping the ThemeProvider & CssBaseline in the Nextjs v13 Pages Route
_app.tsx
fileFurthermore, I am using Nextjs v13 Pages Router with TypeScript.
some small example as below:
and similar way I've in other files, this is the way currently I am having the MUI Design, and the components required like, Box, Container, Grid from
@mui/material
Environment
npx @mui/envinfo
I am using Latest & Updated CHROME Browser.
The text was updated successfully, but these errors were encountered: