当前位置: 首页> 文旅> 文化 > seo公司彼亿营销_莱芜网站优化公司_哈尔滨seo整站优化_手机百度高级搜索

seo公司彼亿营销_莱芜网站优化公司_哈尔滨seo整站优化_手机百度高级搜索

时间:2025/7/9 21:49:19来源:https://blog.csdn.net/qq_44894943/article/details/145966930 浏览次数:0次
seo公司彼亿营销_莱芜网站优化公司_哈尔滨seo整站优化_手机百度高级搜索

npm list axios echarts查看npm依赖包出现以下报错,原因就是包的版本匹配问题,按照提示降axios版本或者自己升找合适的got版本,我这里是选择了降版本。本文记录仅做解决思路参考不一定适配大家的实际情况。

weed-detection-system@1.0.0 E:\Project\gitProject\weed_detection_project\frontend
├── axios@1.8.1 -> .\node_modules\.store\axios@1.8.1\node_modules\axios
├── echarts@5.6.0 -> .\node_modules\.store\echarts@5.6.0\node_modules\echarts
└─┬ electron@34.3.0 -> .\node_modules\.store\electron@34.3.0\node_modules\electron└─┬ @electron/get@2.0.3 -> .\node_modules\.store\@electron+get@2.0.3\node_modules\@electron\get└─┬ got@11.8.6 -> .\node_modules\.store\got@11.8.6\node_modules\got├── axios@1.8.1 deduped invalid: "^0.20.0" from node_modules/.store/got@11.8.6/node_modules/got -> .\node_modules\.store\axios@1.8.1\node_modules\axios       └─┬ http2-wrapper@1.0.3 -> .\node_modules\.store\http2-wrapper@1.0.3\node_modules\http2-wrapper└─┬ got@11.8.6 -> .\node_modules\.store\got@11.8.6\node_modules\got└── axios@1.8.1 deduped invalid: "^0.20.0" from node_modules/.store/got@11.8.6/node_modules/got, "^0.20.0" from node_modules/.store/got@11.8.6/node_modules/got -> .\node_modules\.store\axios@1.8.1\node_modules\axiosnpm error code ELSPROBLEMS
npm error invalid: axios@1.8.1 E:\Project\gitProject\weed_detection_project\frontend\node_modules\axios

安装过程一次性安装很容易出现包之间的依赖问题,最好按完后list检查一下,我这里选择自己去匹配对应的版本
,一个一个安装然后查看依赖
首先我安装我需要的第一个包cnpm install electron --legacy-peer-deps
然后用list查看它的依赖,然后发现有以下问题
在这里插入图片描述
包之间的版本不匹配,以防后续还有别的坑我直接删除node_modules文件夹重新安装包并指定版本

cnpm install electron@^34.3.0  http2-wrapper@^2.0.7

安装完后再查看依赖没有飘红了就可以接着安其他依赖项
在这里插入图片描述

关键字:seo公司彼亿营销_莱芜网站优化公司_哈尔滨seo整站优化_手机百度高级搜索

版权声明:

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

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

责任编辑: