react项目,npm i -D @rescripts/cli时候报错
$ npm i -D @rescripts/cli
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: reactapp@0.1.0
npm ERR! Found: react-scripts@5.0.1
npm ERR! node_modules/react-scripts
npm ERR! react-scripts@"5.0.1" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer react-scripts@"2 - 4" from @rescripts/cli@0.0.16
npm ERR! node_modules/@rescripts/cli
npm ERR! dev @rescripts/cli@"^0.0.16" 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 C:\Users\shangkk\AppData\Local\npm-cache\eresolve-report.txt for a full report.
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\shangkk\AppData\Local\npm-cache\_logs\2022-06-21T02_18_36_816Z-debug.log
参考: blog.csdn.net/Rae_1999/ar…
其他因为webpack过时导致的问题参考:
子项目 如果写了 min-height: 100vh; 则在父项目需要增加 overflow:auto,否则会超出子项目容器, 或者去掉子项目中100vh的样式