无法使用npm安装redux和datepicker

nkcskrwz  于 11个月前  发布在  其他
关注(0)|答案(1)|浏览(121)

已尝试使用以下npm命令安装reduxreact-datepickerreact-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-datepickerreact-redux和其他变量。

toiithl6

toiithl61#

软件包 * 已 * 安装,漏洞警告只是 * 警告,通常可以忽略。如果您想更新/修复它们,请运行npm audit fix
请确保您在正确的目录中安装项目依赖项,例如项目的根目录,然后尝试运行以下命令:

npm i -S react-redux @reduxjs/toolkit react-datepicker react-router-dom@6

字符串
这应该安装 * 和 * 更新package.json文件。-S--save标志在旧的Node和NPM版本中执行此操作。

相关问题