已尝试使用以下npm命令安装redux
、react-datepicker
和react-router-dom
。
npm i react-redux @reduxjs/toolkit react-datepicker react-router-dom@6
字符串
我注意到package.json没有得到更新,并且在终端中输出了以下内容:
up to date, audited 157 packages in 16s
22 packages are looking for funding
run `npm fund` for details
15 high severity vulnerabilities
To address issues that do not require attention, run:
npm audit fix
To address all issues (including breaking changes), run:
npm audit fix --force
Run `npm audit` for details.
型
我在检查堆栈溢出后尝试了npm set registry=https://registry.npmjs.org/
。
这怎么解决?!
Package.json
{
"name": "client",
"version": "0.1.0",
"private": true,
"dependencies": {
"@testing-library/jest-dom": "^5.17.0",
"@testing-library/react": "^13.4.0",
"@testing-library/user-event": "^13.5.0",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-scripts": "5.0.1",
"web-vitals": "^2.1.4"
},
型
此处应添加react-datepicker
、react-redux
和其他变量。
1条答案
按热度按时间toiithl61#
软件包 * 已 * 安装,漏洞警告只是 * 警告,通常可以忽略。如果您想更新/修复它们,请运行
npm audit fix
。请确保您在正确的目录中安装项目依赖项,例如项目的根目录,然后尝试运行以下命令:
字符串
这应该安装 * 和 * 更新package.json文件。
-S
或--save
标志在旧的Node和NPM版本中执行此操作。