0

I want to import Css Baseline from @mui/material , which is there in my json but i get'@mui/material' should be listed in the project's dependencies.What should I do been stuck here for a while now!

{
  "name": "time_pass",
  "version": "0.1.0",
  "private": true,
  "dependencies": {
    "@alan-ai/alan-sdk-web": "^1.8.44",
    "@emotion/react": "^11.11.1",
    "@emotion/styled": "^11.11.0",
    "@mui/icons-material": "^5.11.16",
    "@mui/material": "^5.13.5",
    "@reduxjs/toolkit": "^1.9.5",
    "@testing-library/jest-dom": "^5.16.5",
    "@testing-library/react": "^13.4.0",
    "@testing-library/user-event": "^13.5.0",
    "axios": "^1.4.0",
    "react": "^18.2.0",
    "react-dom": "^18.2.0",
    "react-redux": "^8.1.0",
    "react-router-dom": "^6.12.1",
    "react-scripts": "5.0.1",
    "web-vitals": "^2.1.4"
},

I tried installing @mui/materials specifically using npm i -S @mui/material still its a no go.

Geshode
  • 3,600
  • 6
  • 18
  • 32
  • I guess the issue is with the installation: Go through this solution and let me know: https://stackoverflow.com/a/76340077/21957513 – Maulik Patel Jun 14 '23 at 07:25
  • 1
    You have `@mui/material` in your dependencies. And you said, that you have installed it. Can you provide us with the code, which shows how you try to import CSS Baseline? Is it the same way as it is described in the [documentation](https://mui.com/material-ui/react-css-baseline/)? – Geshode Jun 14 '23 at 07:27

1 Answers1

0

If "npm install @mui/material" is not working, you can try to reinstall the dependencies by running

npm install

again and deleting the 'node_modules' folder in your project to ensure a clean installation. Make sure and verify that you are using an updated version of Node.js by running the "npm --version"in your command line.

Julia
  • 512
  • 6