当前位置: 首页 > news >正文

npm install 出错,按照版本不匹配解决

一、现象

npm install 

npm WARN config global `--global`, `--local` are deprecated. Use `--location=global` instead.
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: panshi-main-web@0.1.0
npm ERR! Found: eslint@6.8.0
npm ERR! node_modules/eslint
npm ERR!   dev eslint@"^6.8.0" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer eslint@">=7.0.0" from eslint-config-prettier@8.10.0
npm ERR! node_modules/eslint-config-prettier
npm ERR!   dev eslint-config-prettier@"^8.4.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 ERR!
npm ERR! See C:\UserData\Local\npm-cache\eresolve-report.txt for a full report.

二、解决方式:   

输入 npm i --legacy-peer-deps 回车解决(记得重启服务)

方法一:删除C:\Users\Administrator下的.npmrc文件即可(可能会没有,执行方法二)

方法二:删除C:\Users\Administrator\AppData\Roaming下边的npm、npm-cache

方法三:删除C:\Users\Administrator下的.npm_repl_history文件

之后重新安装node.js

http://www.lryc.cn/news/360151.html

相关文章:

  • 【第1章】SpringBoot实战篇之注册接口
  • 代码随想录-Day25
  • JavaWeb_SpringBootWeb基础
  • Stable Diffusion生成图片的参数查看与抹除方法
  • Linux下多线程的相关概念
  • 在java java.util.Date 已知逝去时间怎么求年月日
  • LeetCode 2928.给小朋友们分糖果 I:Java提交的运行时间超过了61%的用户
  • 【typescript/flatbuffer】在websocket中使用flatbuffer
  • 构建一个文字冒险游戏:Python 编程实战
  • 09Linux GDB学习笔记
  • 海外金融牌照
  • addEventListener()方法中的几个参数,以及作用
  • FreeRtos进阶——通用链表的实现方式
  • 【kubernetes】关于k8s集群如何将pod调度到指定node节点(亲和与反亲和等)
  • AOP基础
  • EXSI虚拟机新增磁盘并将空间扩充到已有分区
  • 民国漫画杂志《时代漫画》第39期.PDF
  • 每天一个数据分析题(三百四十二)
  • c++会员消费积分系统
  • 如何获知表中数据被删除
  • 机器学习之sklearn基础教程
  • ES升级--04--SpringBoot整合Elasticsearch
  • eclipse如何debug
  • 无人售货机零售业务成功指南:从市场分析到创新策略
  • 开源代码分享(32)-基于改进多目标灰狼算法的冷热电联供型微电网运行优化
  • 7、架构-架构的安全性
  • LeetCode题练习与总结:路径总和Ⅱ--113
  • Java复数计算
  • MySQL-事务日志
  • PySide6 GUI 学习笔记——常用类及控件使用方法(常用类坐标点QPoint)