【发布时间】:2022-02-11 13:17:14
【问题描述】:
我正在学习 React Js,我使用的 IDE 是 VS Code。我无法使用命令npm install react-router dom 安装反应路由器 dom。每当我输入npm install react-router-dom 时,我都会收到消息。没有安装 react-router。
Windows PowerShell Copyright (C) Microsoft Corporation. All rights reserved.
up to date, audited 1407 packages in 4s
169 packages are looking for funding
run `npm fund for details
8 moderate severity vulnerabilities
To address all issues (including breaking changes), run:
npm audit fix --force
Run `npm audit for details.
【问题讨论】:
-
请分享错误详情。系统已经给出了解决问题的建议。 npm audit fix --force 也可以在 vscode 终端中试一试。
-
确定没有安装?你没有提到任何错误。运行
npm list react-router-dom并验证您的项目目录中安装了什么。 -
只是一个警告,包已经安装好了,你可以使用react router
-
我尝试了 npm audit fix --force.. 但它不起作用,而是再次显示相同的消息.. 路由器 dom 也没有安装,因为我在文件中交叉检查了它目录两次...
-
“在文件目录中交叉检查了两次”是什么意思?您是否从项目目录运行
npm list react-router-dom来记录安装的内容?
标签: reactjs npm react-router