首页 前端知识 npm install安装依赖包报错:Fix the upstream dependency conflict, or retry npm ERR! this command with --force

npm install安装依赖包报错:Fix the upstream dependency conflict, or retry npm ERR! this command with --force

2024-06-21 00:06:11 前端知识 前端哥 29 117 我要收藏

npm install 安装报错:Fix the upstream dependency conflict

在这里插入图片描述

报错:

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

正确解决:

有两个命令可以解决此问题

  1. –force 无视冲突,强制获取远端npm库资源 (覆盖之前)
  2. –legacy-peer-deps 忽视依赖冲突,继续安装(不覆盖之前)
    正确的语句:
 npm install axios --force   //或者
 npm install axios --legacy-peer-deps
转载请注明出处或者链接地址:https://www.qianduange.cn//article/13075.html
标签
评论
发布的文章

jQuery 选择器

2024-05-12 00:05:34

Vue中public/assets目录区别

2024-07-02 23:07:29

大家推荐的文章
会员中心 联系我 留言建议 回顶部
复制成功!