本文介绍: PS D:桌面电脑codevue2day06demo-3> npm i axios -S npm ERR! code ERESOLVE npm ERR! ERESOLVE could not resolve npm ERR! npm ERR! While resolving: @vue/eslintconfigstandard@6.1.0 npm ERR! Found: eslintpluginvue@8.7.1 npm ERR! node_modul

如果出现一下问题,则说明npm版本问题

PS D:桌面电脑codevue2day06demo-3> npm i axios -S npm ERR! code
ERESOLVE npm ERR! ERESOLVE could not resolve npm ERR! npm ERR! While
resolving: @vue/eslintconfigstandard@6.1.0 npm ERR! Found:
eslintpluginvue@8.7.1 npm ERR! node_modules/eslintpluginvue npm
ERR! dev eslintpluginvue@“^8.0.3” from the root project npm ERR!
npm ERR! Could not resolve dependency: npm ERR! peer
eslintpluginvue@“^7.0.0” from @vue/eslintconfigstandard@6.1.0 npm
ERR! node_modules/@vue/eslintconfig-standard npm ERR! dev
@vue/eslintconfig-standard@“^6.1.0” from the root project npm ERR!
npm ERR! Conflicting peer dependency: eslintplugin-vue@7.20.0 npm
ERR! node_modules/eslintplugin-vue npm ERR! peer
eslint-plugin-vue@“^7.0.0” from @vue/eslintconfig-standard@6.1.0 npm
ERR! node_modules/@vue/eslintconfig-standard npm ERR! dev
@vue/eslintconfig-standard@“^6.1.0” from the root project npm ERR!
npm ERR! Fix the upstream dependency conflict, or retry npm ERR! this
command withforce or —legacypeer-deps npm ERR! to accept an
incorrect (and potentially broken) dependency resolution. npm ERR! npm
ERR! npm ERR! For a full report see: npm ERR! E:Program
Filesnodejsnode_cache_logs2023-05-12T05_37_45_879Z-eresolvereport.txt

npm ERR! A complete log of this run can be found in: npm ERR!
E:Program
Filesnodejsnode_cache_logs2023-05-12T05_37_45_879Z-debug-0.log

在这里插入图片描述这个问题也是比较容易解决的,只要在后面加上这个指令

--legacy-peer-deps**

正确使用方法,即以下这种:

npm i axios -S --legacy-peer-deps

安装一些依赖报错如上的代码图片所示

解决方案:在完整指令后面添加–legacy-peer-deps

这样写之后就可以安装成功了
在这里插入图片描述

原文地址:https://blog.csdn.net/weixin_52504437/article/details/130640563

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任

如若转载,请注明出处:http://www.7code.cn/show_28994.html

如若内容造成侵权/违法违规/事实不符,请联系代码007邮箱suwngjj01@126.com进行投诉反馈,一经查实,立即删除

发表回复

您的邮箱地址不会被公开。 必填项已用 * 标注