Skip to content
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

When i am installing material ui on my next js 15 version it gives me error #44584

Closed
ashishjaswal2002 opened this issue Nov 28, 2024 · 5 comments
Labels
bug 🐛 Something doesn't work regression A bug, but worse

Comments

@ashishjaswal2002
Copy link

ashishjaswal2002 commented Nov 28, 2024

Summary

I am running this command on my terminal
npm install @mui/material-nextjs @emotion/cache

and I am getting this error

(node:53811) ExperimentalWarning: CommonJS module /opt/homebrew/lib/node_modules/npm/node_modules/debug/src/node.js is loading ES Module /opt/homebrew/lib/node_modules/npm/node_modules/supports-color/index.js using require().
Support for loading ES Module in require() is an experimental feature and might change at any time
(Use node --trace-warnings ... to show where the warning was created)
npm error code ERESOLVE
npm error ERESOLVE unable to resolve dependency tree
npm error
npm error While resolving: [email protected]
npm error Found: [email protected]
npm error node_modules/next
npm error next@"15.0.3" from the root project
npm error
npm error Could not resolve dependency:
npm error peer next@"^13.0.0 || ^14.0.0" from @mui/[email protected]
npm error node_modules/@mui/material-nextjs
npm error @mui/material-nextjs@"*" from the root project
npm error
npm error Fix the upstream dependency conflict, or retry
npm error this command with --force or --legacy-peer-deps
npm error to accept an incorrect (and potentially broken) dependency resolution.
npm error
npm error
npm error For a full report see:
npm error /Users/abc/.npm/_logs/2024-11-28T07_41_05_430Z-eresolve-report.txt
npm error A complete log of this run can be found in: /Users/abc/.npm/_logs/2024-11-28T07_41_05_430Z-debug-0.log

Examples

I am Using Next JS 15 stable version
"dependencies": {
"@emotion/react": "^11.13.5",
"@emotion/styled": "^11.13.5",
"@mui/icons-material": "^5.16.8",
"@mui/material": "^5.16.8",
"next": "15.0.3",
"react": "^18.3.1",
"react-dom": "^18.3.1"
},

Motivation

No response

Search keywords: Material ui

@ashishjaswal2002 ashishjaswal2002 added the status: waiting for maintainer These issues haven't been looked at yet by a maintainer label Nov 28, 2024
@siriwatknp
Copy link
Member

Please try again with npm install @mui/material@latest @mui/icons-material@latest.

The latest version should be 6.1.9 at the time of writing.

@siriwatknp siriwatknp removed the status: waiting for maintainer These issues haven't been looked at yet by a maintainer label Nov 28, 2024
Copy link

This issue has been closed. If you have a similar problem but not exactly the same, please open a new issue.
Now, if you have additional information related to this issue or things that could help future readers, feel free to leave a comment.

Note

@ashishjaswal2002 How did we do? Your experience with our support team matters to us. If you have a moment, please share your thoughts in this short Support Satisfaction survey.

@siriwatknp siriwatknp added the support: question Community support but can be turned into an improvement label Nov 28, 2024
@ashishjaswal2002
Copy link
Author

ashishjaswal2002 commented Nov 28, 2024

Module not found: Can't resolve '@mui/material-nextjs/v15-appRouter'

  1 |
> 2 | import { AppRouterCacheProvider } from '@mui/material-nextjs/v15-appRouter';
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

@siriwatknp

@oliviertassinari oliviertassinari added bug 🐛 Something doesn't work regression A bug, but worse and removed support: question Community support but can be turned into an improvement labels Nov 28, 2024
@siriwatknp
Copy link
Member

Module not found: Can't resolve '@mui/material-nextjs/v15-appRouter'

  1 |
> 2 | import { AppRouterCacheProvider } from '@mui/material-nextjs/v15-appRouter';
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

@siriwatknp

Are you on @mui/material-nextjs: "6.1.9"?

@DonikaV
Copy link
Contributor

DonikaV commented Dec 12, 2024

Is there any difference between import of v15-appRouter or 14th if index.js imports the 13th under the hood? :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 🐛 Something doesn't work regression A bug, but worse
Projects
None yet
Development

No branches or pull requests

4 participants