Material UI

Code

UI

Resources

6 thoughts on “Material UI”

    1. Which import are you referring to? I assume:

      import { AppRouterCacheProvider } from "@mui/material-nextjs/v13-appRouter";

      In that case, you are correct we should be importing directly from @mui/material-nextjs/v13-appRouter which is what the official Next.js MUI integration guide recommends and is required to work with the new App Router approach. This is what we do in the lecture as you can see here.

  1. [{
    “resource”: “../app/layout.tsx”,
    “owner”: “typescript”,
    “code”: “2307”,
    “severity”: 8,
    “message”: “Cannot find module ‘@mui/material-nextjs/v13-appRouter’ or its corresponding type declarations.”,
    “source”: “ts”,
    “startLineNumber”: 2,
    “startColumn”: 40,
    “endLineNumber”: 2,
    “endColumn”: 76
    }] how to fix this???

    1. Hi, have you installed the necessary dependencies with the command:

      npm install @mui/material-nextjs @emotion/cache

      If so, please share your GitHub repository URL with me so I can try to reproduce the issue. Many thanks!

  2. Hi Michael,

    Big fan of your youtube and very excited to become member and go through all the tutorials.

    In newer versions of npm (5.0.0 and later), the –save flag is actually the default behavior, so you don’t need to explicitly include it. Simply running npm install will both install the package and add it to your dependencies. 🙂

    1. Thanks so much, I really appreciate the support 🙂

      That tip is incredible, I didn’t realize that behavior was default now (so much better). I will utilize this moving forward – thanks again.

Leave a Reply