【问题标题】:React router is not installing on my Windows machineReact 路由器没有安装在我的 Windows 机器上
【发布时间】:2021-11-04 20:39:23
【问题描述】:

这是我运行安装 react-router 的命令:-

npm install --save react-router

这是我的提示窗口显示的输出:-

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\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"})
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"})

+ react-router@5.2.1
updated 1 package and audited 1960 packages in 20.878s

148 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

请帮我解决这个问题。

【问题讨论】:

  • 有了上面的信息,很明显它已经安装了。检查 package.json 文件中的依赖关系。
  • 谢谢。它在依赖项中。其实我是初学者。

标签: javascript reactjs npm cmd npm-install


【解决方案1】:

npm i install-peers -D

您可以使用它来安装对等依赖项。

我遇到了同样的问题。

【讨论】:

    猜你喜欢
    • 2017-10-26
    • 2014-07-22
    • 2011-02-05
    • 1970-01-01
    • 1970-01-01
    • 2021-08-07
    • 2017-07-01
    • 2022-07-18
    • 2019-10-12
    相关资源
    最近更新 更多