gpt4 book ai didi

javascript - 无法升级到 React-Bootstrap 最新版本

转载 作者:行者123 更新时间:2023-11-29 10:28:32 31 4
gpt4 key购买 nike

当我升级到最新版本的 react-bootstrap 时遇到问题

npm install --save react-bootstrap

它打印:

npm notice created a lockfile as package-lock.json. You should commit this file.
npm WARN eslint-config-react-app@0.2.1 requires a peer of babel-eslint@6.1.2 but none is installed. You must install peer dependencies yourself.
npm WARN eslint-config-react-app@0.2.1 requires a peer of eslint@3.5.0 but none is installed. You must install peer dependencies yourself.
npm WARN eslint-config-react-app@0.2.1 requires a peer of eslint-plugin flowtype@2.18.1 but none is installed. You must install peer dependencies yourself.
npm WARN eslint-config-react-app@0.2.1 requires a peer of eslint-plugin-import@1.12.0 but none is installed. You must install peer dependencies yourself.
npm WARN eslint-config-react-app@0.2.1 requires a peer of eslint-plugin-jsx-a11y@2.2.2 but none is installed. You must install peer dependencies yourself.
npm WARN eslint-config-react-app@0.2.1 requires a peer of eslint-plugin-react@6.3.0 but none is installed. You must install peer dependencies yourself.
npm WARN react-addons-test-utils@15.6.2 requires a peer of react-dom@^15.4.2 but none is installed. You must install peer dependencies yourself.
npm WARN react-bootstrap-typeahead@1.4.2 requires a peer of react@^0.14.0 || ^15.2.0 but none is installed. You must install peer dependencies yourself.
npm WARN react-bootstrap-typeahead@1.4.2 requires a peer of react-dom@^0.14.0 || ^15.2.0 but none is installed. You must install peer dependencies yourself.
npm WARN react-dev-utils@0.2.1 requires a peer of webpack@^1.13.2 but none is installed. You must install peer dependencies yourself.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.0.14 (node_modules\react-scripts\node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.0.14: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.4 (node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.4: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})

+ react-bootstrap@0.30.10
updated 1 package and audited 29067 packages in 20.627s
found 275 vulnerabilities (163 low, 77 moderate, 33 high, 2 critical) run `npm audit fix` to fix them, or `npm audit` for details

所以不是更新到版本 0.32.4,而是保持在 0.30.10

我应该怎么做才能修复它?我的测试(使用 Jest)失败了,原因可能是因为并非所有依赖项都更新到最新版本。尽可能多地更新,但现在我必须更新 react-bootstrap。

包.json

{
"name": "my-app",
"version": "0.1.0",
"private": true,
"devDependencies": {
"babel-jest": "^23.6.0",
"babel-polyfill": "^6.26.0",
"babel-preset-env": "^1.7.0",
"babel-preset-es2015": "^6.24.1",
"babel-preset-react": "^6.24.1",
"enzyme": "^3.6.0",
"jest": "^23.6.0",
"react-addons-test-utils": "^15.6.2",
"react-dom": "^16.5.0",
"react-scripts": "^0.6.1",
"react-test-renderer": "^16.5.0"
},
"dependencies": {
"adal-angular": "^1.0.17",
"axios": "^0.15.3",
"bootstrap": "^3.3.7",
"jquery": "^3.3.1",
"lodash": "^4.17.10",
"prop-types": "^15.6.2",
"react": "^16.5.0",
"react-bootstrap": "^0.30.10",
"react-bootstrap-typeahead": "^1.4.2",
"react-http-request": "^1.0.4",
"react-overlays": "^0.8.3",
"react-router-dom": "^4.3.1"
},
"scripts": {
"start": "react-scripts start",
"build": "react-scripts build",
"test": "jest",
"eject": "react-scripts eject"
},
"description": "This project was bootstrapped with [Create React App](https://github.com/facebookincubator/create-react-app).",
"main": "index.js",
"author": "",
"license": "ISC",
"jest": {
"moduleNameMapper": {
"\\.(jpg|jpeg|png|gif|eot|otf|webp|svg|ttf|woff|woff2|mp4|webm|wav|mp3|m4a|aac|oga)$": "<rootDir>/__mocks__/fileMock.js",
"\\.(css|less)$": "<rootDir>/__mocks__/styleMock.js"
}
}
}

最佳答案

尝试

npm install --save react-bootstrap@0.32.4

yarn add react-bootstrap@0.32.4

关于javascript - 无法升级到 React-Bootstrap 最新版本,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/52293512/

31 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com