当前位置:网站首页>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
边栏推荐
- 2022年暑假ACM热身练习1(总结)
- JSX 语法
- Codeforces round #664C
- es6 map提取数组对象
- Record buuctf [netding Cup 2018] unfinish1 problem solving ideas
- Uni app wechat official account (1) - Web page authorization login
- Day10 front back continuous adjustment
- 学习STM32F103时涉及的C语言知识汇总(仅链接)
- Day14 view set and route
- 使用leaflet仿原神提瓦特大地图制作日记
猜你喜欢

服务器如何安装宝塔面板?(宝塔面板安装教程)

当 std::bind 遇上 this

2022年暑假ACM热身练习2(总结)

From catf1ag two-hour AK match pwn/attack killing, summarize the common command guide of emergency response

数据库连接池、sequelize实现增删改查等操作

uni-app微信公众号(1)——网页授权登录

ModelArts-图像分类and物体检测

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

Use bat to automatically execute CMD commands (multiple commands or a single command)

object-fit:cover; It doesn't work in the applet. How to deal with the deformation of the applet image
随机推荐
JSX syntax
Registry hijacking triggers malicious programs
[SWPU 2019] network TTL encryption and some related knowledge
Day11 serializer
tp-watermark.js网页添加水印插件
服务器如何安装宝塔面板?(宝塔面板安装教程)
Raw Socket抓包,某些端口的数据包抓不到
CTF CRYPTO RSA入门刷题
今天的码农女孩做了关于生命周期的笔记以及动态时钟的练习
VsCode建立非工程目录下的头文件自动查找
Single page application spa and multi page application MPa
【专题】用ST表解决RMQ刷题总结
(六)test命令
Quine injection of SQL injection
量化行业知识汇总
数据库连接池、sequelize实现增删改查等操作
Uni app wechat official account (4) - address management page
Uni app wechat applet - Mall (6) - my home page
es可选链
Uni app wechat applet - Mall (4) - merchants