首页 > 解决方案 > Material UI 安装对等依赖项

问题描述

我按照材料 ui 网站上的说明进行了安装。我安装成功,但是安装产生了几个以“npm WARN”开头的警告,并告诉我必须自己安装对等依赖项。我希望有人可以让我知道 1)这个问题的原因和 2)如何安装对等依赖项(假设这是解决方案)。

这是我运行命令安装 material-ui 后终端显示的所有内容

PS C:\Users\Benjamin\PROGRAMMING_PROJECTS\REACT_PROJECTS\tutorial_material_ui> npm install @mui/material @emotion/react @emotion/styled
npm WARN @babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining@7.15.4 requires a peer of @babel/core@^7.13.0 but none is installed. You must install peer dependencies yourself.
npm WARN tsutils@3.21.0 requires a peer of typescript@>=2.8.0 || >= 3.2.0-dev || >= 3.3.0-dev || >= 3.4.0-dev || >= 3.5.0-dev || >= 3.6.0-dev || >= 3.6.0-beta || >= 3.7.0-dev || >= 3.7.0-beta but none is installed. You must install peer dependencies yourself.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@2.3.2 (node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@2.3.2: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.13 (node_modules\webpack-dev-server\node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.13: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.13 (node_modules\watchpack-chokidar2\node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.13: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})

+ @emotion/react@11.4.1
+ @emotion/styled@11.3.0
+ @mui/material@5.0.0
added 36 packages from 46 contributors and audited 1988 packages in 31.331s

155 packages are looking for funding
  run `npm fund` for details

found 3 moderate severity vulnerabilities
  run `npm audit fix` to fix them, or `npm audit` for details

标签: reactjsmaterial-ui

解决方案


推荐阅读