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

Can't integrate latest next.js with pages router with MUI #43267

Closed
zbycz opened this issue Aug 12, 2024 · 2 comments
Closed

Can't integrate latest next.js with pages router with MUI #43267

zbycz opened this issue Aug 12, 2024 · 2 comments
Assignees
Labels
docs Improvements or additions to the documentation nextjs support: docs-feedback Feedback from documentation page

Comments

@zbycz
Copy link

zbycz commented Aug 12, 2024

Related page

https://mui.com/material-ui/integrations/nextjs/

Kind of issue

Broken demo

Issue description

Run yarn create next-app
Follow demo.
Observe this error:

❯ node -v
v20.16.0

❯ yarn next dev
  ▲ Next.js 14.2.5
  - Local:        http://localhost:3000

 ✓ Starting...
 ✓ Ready in 2.4s
 ○ Compiling / ...
 ⨯ ./node_modules/@mui/material-nextjs/v13-pagesRouter/pagesRouterV13App.js:2:1
Module not found: Can't resolve '@emotion/react'

https://nextjs.org/docs/messages/module-not-found

Import trace for requested module:
./node_modules/@mui/material-nextjs/v13-pagesRouter/index.js
./src/pages/_app.tsx

Also the _app.tsx file looks very different. It should be updated to latest next.js template.

Context

Install latest next.js with pages router and use MUI.

Search keywords: next.js with pages router, MUI

@zbycz zbycz added status: waiting for maintainer These issues haven't been looked at yet by a maintainer support: docs-feedback Feedback from documentation page labels Aug 12, 2024
@siriwatknp siriwatknp added docs Improvements or additions to the documentation and removed status: waiting for maintainer These issues haven't been looked at yet by a maintainer labels Aug 13, 2024
@DiegoAndai
Copy link
Member

Hey @zbycz, did you check this comment? #40798 (comment)
Does this solve your issue?

@zbycz zbycz closed this as completed Nov 29, 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

@zbycz 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs Improvements or additions to the documentation nextjs support: docs-feedback Feedback from documentation page
Projects
None yet
Development

No branches or pull requests

4 participants