当前位置:网站首页>2022.7.7 一些错误总结
2022.7.7 一些错误总结
2022-07-17 00:07:00 【长寿的秘诀就是睡.】
1.拉取代码后 npm i 提示错误
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: [email protected]
npm ERR! Found: [email protected]
npm ERR! node_modules/eslint
npm ERR! dev [email protected]"^6.8.0" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer [email protected]"^5.0.0" from [email protected]
npm ERR! node_modules/eslint-plugin-vue
npm ERR! dev [email protected]"^5.2.3" 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:\Users\18308\AppData\Local\npm-cache\eresolve-report.txt for a full report.
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\18308\AppData\Local\npm-cache\_logs\2022-07-07T01_56_48_979Z-debug-0.log 解决方案: 输入 npm i --legacy-peer-deps 回车解决(记得重启服务)
2.npm -version 报错
Error: Cannot find module 'yallist'
Require stack:
- C:\Users\18308\AppData\Roaming\npm\node_modules\npm\node_modules\semver\node_modules\lru-cache\index.js
- C:\Users\18308\AppData\Roaming\npm\node_modules\npm\node_modules\semver\classes\range.js
- C:\Users\18308\AppData\Roaming\npm\node_modules\npm\node_modules\semver\classes\comparator.js
- C:\Users\18308\AppData\Roaming\npm\node_modules\npm\node_modules\semver\index.js
- C:\Users\18308\AppData\Roaming\npm\node_modules\npm\lib\cli.js
- C:\Users\18308\AppData\Roaming\npm\node_modules\npm\bin\npm-cli.js
at Function.Module._resolveFilename (node:internal/modules/cjs/loader:933:15)
at Function.Module._load (node:internal/modules/cjs/loader:778:27)
at Module.require (node:internal/modules/cjs/loader:1005:19)
at require (node:internal/modules/cjs/helpers:102:18)
at Object.<anonymous> (C:\Users\18308\AppData\Roaming\npm\node_modules\npm\node_modules\semver\node_modules\lru-cache\index.js:4:17)
at Module._compile (node:internal/modules/cjs/loader:1105:14)
at Object.Module._extensions..js (node:internal/modules/cjs/loader:1159:10)
at Module.load (node:internal/modules/cjs/loader:981:32)
at Function.Module._load (node:internal/modules/cjs/loader:822:12)
at Module.require (node:internal/modules/cjs/loader:1005:19) {
code: 'MODULE_NOT_FOUND',
requireStack: [
'C:\\Users\\18308\\AppData\\Roaming\\npm\\node_modules\\npm\\node_modules\\semver\\node_modules\\lru-cache\\index.js',
'C:\\Users\\18308\\AppData\\Roaming\\npm\\node_modules\\npm\\node_modules\\semver\\classes\\range.js',
'C:\\Users\\18308\\AppData\\Roaming\\npm\\node_modules\\npm\\node_modules\\semver\\classes\\comparator.js',
'C:\\Users\\18308\\AppData\\Roaming\\npm\\node_modules\\npm\\node_modules\\semver\\index.js',
'C:\\Users\\18308\\AppData\\Roaming\\npm\\node_modules\\npm\\lib\\cli.js',
'C:\\Users\\18308\\AppData\\Roaming\\npm\\node_modules\\npm\\bin\\npm-cli.js'
]
}解决方案:
方法一:删除C:\Users\Administrator下的.npmrc文件即可(可能会没有,执行方法二)
方法二:删除C:\Users\Administrator\AppData\Roaming下边的npm、npm-cache
方法三:删除C:\Users\Administrator下的.npm_repl_history文件
之后重新安装node.js,即可
————————————————
版权声明:本文为CSDN博主「终是庄周梦了蝶_G」的原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接及本声明。
原文链接:https://blog.csdn.net/crazySlayer/article/details/122508818
3.注意node版本,版本太老不行
4.执行 npm run serve 时报错:The project seems to require yarn but it‘s not installed。
解决方案:npm install -g yarn
边栏推荐
- promise
- 量化行业知识汇总
- 二分法查找
- el-date-picker时间范围控制
- Uni app wechat applet - Mall (7) - Product Details
- Supplementary knowledge of attributes and methods of regular, JWT token, ronglianyun, celery, channel group, SKU, SPU, request object
- 今天的码农女孩学习了关于事件操作和ref属性的笔记并做了表单双向绑定的练习
- Deployment of cobalstrike (with resources)
- Assemblage stylisé de cartes de commutation auto - encapsulées
- Add, delete, modify and check the connection between the two tables
猜你喜欢
![Record buuctf [netding Cup 2018] unfinish1 problem solving ideas](/img/29/6cf1eb89f1cbe087438645668ce103.png)
Record buuctf [netding Cup 2018] unfinish1 problem solving ideas

The C Programming Language (2nd)--笔记--1.6

Uni app wechat applet - Mall (7) - Product Details

【ElenmentUI el-date-picker日期选择器,结束时间不得早于开始时间,且只能选择距开始时间指定天数的日期】

Page layout - three column layout solution

XXX packages are looking for funding run `npm fund` for details解决方法

XSS simple summary

uni-app微信小程序——商城(4)——商家

自己封装的风格化的开关卡片组件

JS replaces a character in the string, and JS modifies the specified character in the string
随机推荐
量化行业知识汇总
Day11 serializer
E-commerce background management login
二分法查找
uni-app微信公众号(5)——新增、修改地址
Uniapp calls the map to query the location and mark the location
markdown编辑器语法——文字颜色、大小、字体与背景色的设置(转载)
Uni app wechat applet - Mall (7) - Product Details
Array Operations - judgment, de duplication, consolidation, expansion
【专题】用ST表解决RMQ刷题总结
Record once easy_ SQL Stack Injection
XXX packages are looking for funding run `npm fund` for details解决方法
【ElenmentUI el-date-picker日期选择器,结束时间不得早于开始时间,且只能选择距开始时间指定天数的日期】
uni 阻止按钮多次点击 按钮多次点击
object-fit:cover;在小程序中不起作用,小程序图片变形了如何处理
The C Programming Language (2nd)--笔记--1.6
Colorful text advertising code, text advertising code beautification version, add text advertising tutorials to the website
今天的码农女孩学习了关于事件操作和ref属性的笔记并做了表单双向绑定的练习
自己封装的风格化的开关卡片组件
(八)Shell函数