所有项目:
- https://github.com/openproxyspace/unfx-proxy-checker
- https://github.com/openproxyspace/unfx-proxy-to-country
- https://github.com/openproxyspace/unfx-proxy-parser
我尝试在第一个项目上使用“npm install”,它给出了一个错误:
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: [email protected]
npm ERR! Found: [email protected]
npm ERR! node_modules/react
npm ERR! dev react@"^18.2.0" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer react@"^15.0.0 || ^16.0.0 || ^17.0.0" from [email protected]
npm ERR! node_modules/react-hot-loader
npm ERR! dev react-hot-loader@"^4.13.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 start”,它给了我这个错误:
'run-p' is not recognized as an internal or external command,
operable program or batch file.
1条答案
按热度按时间wmvff8tz1#
我想
react-hot-loader
是not compatible with React 18。如果你的项目中没有其他模块需要React 18,你可以尝试手动降级你的React版本。您可以通过在package.json
中的dependencies
(或devDependencies
)下搜索react
和react-dom
包并指定版本17.0.2
来完成此操作。否则,可能是React Fast Refresh could be a good alternative到
react-hot-loader
?您也可以尝试忽略该错误
npm ERR!code ERESOLVE
然后修复错误
“run-p”未被识别为内部或外部命令
通过手动安装缺少的软件包:
npm i npm-run-all