gpt4 book ai didi

html - 尝试使用 npm 安装 mui core 时出错

转载 作者:行者123 更新时间:2023-12-05 08:21:35 25 4
gpt4 key购买 nike

我刚刚部署了一个新的 create-react-app,但仍然收到同样的错误消息。我安装了 MUI 并收到“无法解析依赖关系树”

    npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: eat-blended-web@0.1.0
npm ERR! Found: react@18.1.0
npm ERR! node_modules/react
npm ERR! react@"^18.1.0" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer react@"^16.8.0 || ^17.0.0" from @material-ui/core@4.12.4
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/rodriguezmedia/.npm/eresolve-report.txt for a full report.

npm ERR! A complete log of this run can be found in:
npm ERR! /Users/rodriguezmedia/.npm/_logs/2022-05-13T00_57_27_262Z-debug-0.log
rodriguezmedia@Frankies-MacBook-Air-2 eat-blended-web %

最佳答案

而不是使用“npm install @material-ui/core”,只需引用“npm install @mui/material”对于 mui 图标,只需安装“npm install @mui/icons-material”。

有关更多详细信息,请访问“https://www.npmjs.com/package/@mui/icons-material”此页面。

关于html - 尝试使用 npm 安装 mui core 时出错,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/72223457/

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