当前位置: 首页> 科技> 数码 > 宁波外贸公司一览表_杭州营销型网站建设_临汾网络推广_河南做网站的

宁波外贸公司一览表_杭州营销型网站建设_临汾网络推广_河南做网站的

时间:2025/7/11 18:06:51来源:https://blog.csdn.net/weixin_46191445/article/details/142672937 浏览次数:2次
宁波外贸公司一览表_杭州营销型网站建设_临汾网络推广_河南做网站的

npx create-react-app创建react 项目报错

npm error code ERESOLVE
npm error ERESOLVE could not resolve
npm error
npm error While resolving: react-basic@0.1.0
npm error Found: react@undefined
npm error node_modules/react
npm error   react@"*" from the root project
npm error
npm error Could not resolve dependency:
npm error react-scripts@"*" from the root project
npm error
npm error Conflicting peer dependency: react@18.3.1
npm error node_modules/react
npm error   peer react@">= 16" from react-scripts@5.0.1
npm error   node_modules/react-scripts
npm error     react-scripts@"*" from the root project
npm error
npm error Fix the upstream dependency conflict, or retry
npm error this command with --force or --legacy-peer-deps
npm error to accept an incorrect (and potentially broken) dependency resolution.
npm error
npm error
npm error For a full report see:
npm error C:\Users\user\AppData\Local\npm-cache\_logs\2024-10-01T09_32_22_760Z-eresolve-report.txt
npm error A complete log of this run can be found in: C:\Users\user\AppData\Local\npm-cache\_logs\2024-10-01T09_32_22_760Z-debug-0.log

解决方法

npm install -g create-react-app

修改镜像

npm config set registry http://registry.npm.taobao.org

再创建一下react项目试一下~

npx create-react-app react-basic
关键字:宁波外贸公司一览表_杭州营销型网站建设_临汾网络推广_河南做网站的

版权声明:

本网仅为发布的内容提供存储空间,不对发表、转载的内容提供任何形式的保证。凡本网注明“来源:XXX网络”的作品,均转载自其它媒体,著作权归作者所有,商业转载请联系作者获得授权,非商业转载请注明出处。

我们尊重并感谢每一位作者,均已注明文章来源和作者。如因作品内容、版权或其它问题,请及时与我们联系,联系邮箱:809451989@qq.com,投稿邮箱:809451989@qq.com

责任编辑: