React 17.0.2

今天看到react 17.0.2 发布一个礼拜了(快有1年没大的更新了),想升级试一试,在项目下执行 npm update指令,结果报错如下: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 ✗ npm update npm ERR! code ERESOLVE npm ERR! ERESOLVE unable to resolve dependency tree npm ERR! npm ERR! Found: @babel/[email protected] npm ERR! node_modules/@babel/core npm ERR! @babel/core@"7.12.3" from the root project npm ERR! @babel/core@"^7.9.0" from @svgr/[email protected] npm ERR! node_modules/@svgr/webpack npm ERR! @svgr/webpack@"5.4.0" from the root project npm ERR! 9 more (babel-jest, babel-loader, ...) npm ERR! npm ERR! Could not resolve dependency: npm ERR! peer @babel/core@"^7.13.0" from @babel/[email protected] npm ERR! node_modules/@babel/preset-env/node_modules/@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining npm ERR! @babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining@"^7.13.12" from @babel/[email protected] npm ERR! node_modules/@babel/preset-env npm ERR! @babel/preset-env@"^7.9.5" from @svgr/[email protected] npm ERR! node_modules/@svgr/webpack npm ERR! @svgr/webpack@"5.4.0" 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. npm ERR! npm ERR! See /Users/r/.npm/eresolve-report.txt for a full report. npm ERR! A complete log of this run can be found in: npm ERR! /Users/r/.npm/_logs/2021-03-30T08_44_22_160Z-debug.log 这个项目运行过 npm run eject,所以担心是eject造成的。 ...

March 29, 2021 · datewu