我的package.json
文件:
{
"name": "...",
"version": "0.1.0",
"private": true,
"dependencies": {
"@material-ui/core": "^4.12.4",
"apollo-client": "^1.9.2",
"bootstrap": "4.0.0-alpha.6",
"glamor": "^2.20.40",
"glamorous": "^4.9.1",
"history": "^4.7.2",
"jwt-decode": "^2.2.0",
"lodash": "^4.17.4",
"moment": "2.18.1",
"normalize.css": "^7.0.0",
"polished": "^1.7.0",
"prop-types": "^15.6.0",
"qs": "^6.5.1",
"react": "^17.0.0",
"react-addons-css-transition-group": "^15.6.2",
"react-addons-transition-group": "^15.6.2",
"react-apollo": "^1.4.15",
"react-bootstrap": "^0.31.3",
"react-burger-menu": "^3.0.8",
"react-day-picker": "^6.2.1",
"react-dom": "^17.0.0",
"react-loader": "^2.4.2",
"react-rangeslider": "^2.2.0",
"react-rating-stars-component": "^2.2.0",
"react-redux": "^5.0.6",
"react-router": "^4.2.0",
"react-router-bootstrap": "^0.24.4",
"react-router-dom": "^4.2.2",
"react-scripts": "1.0.14",
"react-select": "^1.0.0-rc.10",
"react-stripe-elements": "^1.0.1",
"react-transition-group": "^2.2.1",
"reactstrap": "^4.8.0",
"redux": "^3.7.2",
"redux-form": "^7.1.0",
"redux-logger": "^3.0.6",
"redux-pack": "^0.1.5",
"redux-thunk": "^2.2.0",
"revalidate": "^1.2.0"
},
"scripts": {
"start": "react-scripts start",
"build": "react-scripts build",
"test": "react-scripts test --env=jsdom",
"lint": "eslint src",
"eject": "react-scripts eject"
},
"devDependencies": {
"eslint": "^4.7.2",
"eslint-config-4catalyzer-react": "^0.3.3",
"eslint-plugin-import": "^2.7.0",
"eslint-plugin-jsx-a11y": "^6.6.1",
"eslint-plugin-react": "^7.4.0"
}
}
我正在更新我的代码库。
我希望能够更新单个包,然后测试我的应用程序,然后继续更新另一个包。
我应该使用什么命令进行更新?npm update
还是npm install
?
我尝试npm update redux
,收到以下错误:
npm ERR! code ERESOLVE
npm ERR! ERESOLVE could not resolve
npm ERR!
npm ERR! While resolving: react-apollo@1.4.16
npm ERR! Found: react@17.0.2
npm ERR! node_modules/react
npm ERR! react@"^17.0.0" from the root project
npm ERR! peer react@"^16.8.0 || ^17.0.0" from @material-ui/core@4.12.4
npm ERR! node_modules/@material-ui/core
npm ERR! @material-ui/core@"^4.12.4" from the root project
npm ERR! 14 more (react-transition-group, @material-ui/styles, ...)
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer react@"0.14.x || 15.* || ^15.0.0 || ^16.0.0" from react-apollo@1.4.16
npm ERR! node_modules/react-apollo
npm ERR! react-apollo@"^1.4.15" from the root project
npm ERR!
npm ERR! Conflicting peer dependency: react@16.14.0
npm ERR! node_modules/react
npm ERR! peer react@"0.14.x || 15.* || ^15.0.0 || ^16.0.0" from react-apollo@1.4.16
npm ERR! node_modules/react-apollo
npm ERR! react-apollo@"^1.4.15" from the root project
npm ERR!
npm ERR! Fix the upstream dependency conflict, or retry
npm ERR! this command with --force, or --legacy-peer-deps
npm ERR! to accept an incorrect (and potentially broken) dependency resolution.
这个错误的确切含义是什么?那我该怎么修呢?而不需要--force
或--legacy-peer-deps
?
1条答案
按热度按时间ktecyv1j1#
在此错误中,存在与%2依赖项的兼容性问题。
1.
react-apollo@1.4.16 does not support react 17 version
1.Material UI v4不正式支持Reaction v17
material4 is not compatible with react17