npm install react-router-dom .... 不工作,我收到以下消息

问题描述

Packet.json file

enter image description here

由于 3 个中等严重性漏洞,我的命令提示符无法安装 react-router-dom 运行 npm audit fix 来修复它们,或者运行 npm audit 了解发现的漏洞的详细信息,并且 npm audit fix 没有修复任何东西。它说应该手动审查所有 3 个漏洞,如何修复?非常感谢。

解决方法

貌似安装了react-router-dom 5.2.0版本,是不是不能正常运行的问题?

试试:

  1. 删除您的 node_modules 和 package-lock.json
  2. 从 package.json 文件中移除 react、react-router 和 react-router-dom 依赖
  3. 然后尝试 npm install react react-router react-router-dom --save.
    *注意反应版本应该匹配反应DOM

如果这不起作用,您能否提供更多上下文,例如 package.json 中的内容?

,

我遇到了同样的错误, 用纱线代码解决的问题 试试这个命令..

yarn add react-router-dom