当前位置:首页 > nodejs > 正文内容

npm报错npm ERR! code ERESOLVE

关中浪子1年前 (2023-04-06)nodejs653
【腾讯云】2核2G4M云服务器新老同享99元/年,续费同价
找梯子最重要的就是稳定,这个已经上线三年了,一直稳定没有被封过,赶紧下载备用吧!
npm ERR! code ERESOLVEnpm ERR! ERESOLVE unable to resolve dependency tree
npm ERR! npm ERR! While resolving: antdesignform@1.0.0npm ERR! Found: webpack@3.12.0npm ERR! node_modules/webpack
npm ERR!   webpack@"^3.6.0" from the root project
npm ERR!npm ERR! Could not resolve dependency:npm ERR! peer webpack@"^4.0.0 || ^5.0.0" from compression-webpack-plugin@5.0.2npm ERR! node_modules/compression-webpack-plugin
npm ERR!   compression-webpack-plugin@"^5.0.1" 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\Administrator\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\Administrator\AppData\Local\npm-cache\_logs\2023-02-17T01_55_07_216Z-debug-0.log

解决方案:
查看下node和npm的版本

C:\Users\Administrator>node -v
v16.14.2C:\Users\Administrator>npm -v
8.5.0

npm的版本过高,高版本的比低版本的严格,所以会报错


3.项目中删除文件
将项目中的node-modules文件夹和package-lock.json文件删除。
重新npm install

扫描二维码推送至手机访问。

版权声明:本文由码农翻生发布,如需转载请注明出处。

本文链接:https://lubojian.cn/post/241.html

分享给朋友:

相关文章

error:0308010C:digital envelope routines::unsupported

error:0308010C:digital envelope routines::unsupported

问题描述使用 npm run dev 或者 yarn run dev 时报错:error:0308010C:digital envelope routines::unsupportednodejs 版本为 18.12.1解决方案Google...

npm run dev 报错     Error: module property was removed from Dependency

npm run dev 报错 Error: module property was removed from Dependency

npm run dev  报错如下:Error: module property was removed from Dependency (use compilation.moduleGraph.updateModule(depe...

npm run dev ReferenceError: globalThis is not defined

请考虑将node.js的版本更新为>=12。globalThis已根据此兼容性表添加到node.js v12.0.0中。或者通过更新pm2解决npm install pm2 -gpm2 update...

Node Sass version 5.0.0 is incompatible with^4.0.0

在执行npm run dev 后项目报了 Node Sass version 5.0.0 is incompatible with^4.0.0 这个错误,很明显是Sass 的版本过高,因此需要对 Sass的版本降级为4.0版本。Sass 版...

EventSource 需要添加header等信息

一、原生EventSource(一)定义:MDN详解:Web API 接口参考>EventSource(二)使用方式:  const eventSource = new Ev...

成功解决:npm 版本不支持node.js。【 npm v9.1.2 does not support Node.js v16.6.0.】

成功解决:npm 版本不支持node.js。【 npm v9.1.2 does not support Node.js v16.6.0.】

1.出现的问题根据控制台错误提示信息可知:我的npm版本和node的版本不兼容。查看自己的npm和node版本2、查看自己的npm和node版本//查看npm版本 npm -v   //查看node版本...

发表评论

访客

看不清,换一张

◎欢迎参与讨论,请在这里发表您的看法和观点。