I'm brand new to React and Next.js, so please forgive me for asking what may seem like a silly question. I'm attempting to install Material UI in a fresh Next.js application that I created using "npx create-next-app@latest". I've been referencing the Material UI documentation, specifically the TypeScript section which can be found here.
However, when trying to run the command "npm install @mui/material @emotion/react @emotion/styled", I encountered the following error in my CLI/terminal:
Error: npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
...
Despite trying different approaches such as using --force or --legacy-peer-deps flags, I still couldn't get past the compiler errors while working with Material UI components in my Next.js project. Your assistance would be greatly appreciated as I'm eager to kickstart my project!
If anyone can provide guidance on how to successfully integrate Material UI into a Next.js project with or without TypeScript, I'd be very grateful.