Open zbycz opened 1 month ago
https://mui.com/material-ui/integrations/nextjs/
Broken demo
Run yarn create next-app Follow demo. Observe this error:
yarn create next-app
❯ 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.
Install latest next.js with pages router and use MUI.
Search keywords: next.js with pages router, MUI
Hey @zbycz, did you check this comment? https://github.com/mui/material-ui/issues/40798#issuecomment-1977357094 Does this solve your issue?
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: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