简体   繁体   中英

Cant install Material UI to new react app

Im new to the dev world and I'm trying to start a new react app using material UI as the component library but I keep getting the following error:

错误图片

And my files look like this:

文件夹截图

Can anyone help in layman's terms?

TIA

npm install --save --legacy-peer-deps @material-ui/core

this Material UI version does not support React v18 yet I suggest going for a lower version

I just did this:
-> npx create-react-app travel-advisor (<- that's the name of my app)
-> npm install --save react@17.0.0 react-dom@17.0.0

npm i @mui/material @emotion/react @emotion/styled

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM