gpt4 book ai didi

reactjs - 在安装Material UI时,系统提示我一系列错误?

转载 作者:行者123 更新时间:2023-12-03 13:52:37 25 4
gpt4 key购买 nike

当我尝试使用npm install @ material-ui/core安装Material UI时,系统提示我出现许多错误:

npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: portfolio@0.1.0
npm ERR! Found: react@17.0.1
npm ERR! node_modules/react
npm ERR! react@"^17.0.1" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer react@"^16.8.0" from @material-ui/core@4.11.0
npm ERR! node_modules/@material-ui/core
npm ERR! @material-ui/core@"*" from the root project
npm ERR!
npm ERR! Fix the upstream dependency conflict, or retry
npm ERR! this command with --force, or --legacy-peer-deps
npm ERR! to accept an incorrect (and potentially broken) dependency resolution.
npm ERR!
npm ERR! See /Users/jordanhilado/.npm/eresolve-report.txt for a full report.

npm ERR! A complete log of this run can be found in:
npm ERR! /Users/jordanhilado/.npm/_logs/2020-10-31T17_57_54_724Z-debug.log
我怎样才能解决这个问题?

最佳答案

npm install --save --legacy-peer-deps @ material-ui/core
Material UI尚未正式支持React v17,因此请谨慎使用。

关于reactjs - 在安装Material UI时,系统提示我一系列错误?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/64625021/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com