You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

npm install执行超时后抛出ERESOLVE依赖冲突错误,且npm ping无响应问题求助

npm install执行超时后抛出ERESOLVE依赖冲突错误,且npm ping无响应问题求助

大家好,我最近用npm的时候碰到了挺头疼的问题,想请社区的朋友们帮忙支支招。

我执行npm install命令时,会卡在加载状态足足好几分钟(就是那种长时间pending的状态),之后直接抛出了依赖树解析失败的错误。另外我试了npm ping命令,也完全没有响应。

下面是执行npm install后弹出的完整错误信息:

npm ERR! code ERESOLVE

npm ERR! ERESOLVE unable to resolve dependency tree

npm ERR!

npm ERR! While resolving: cosmetology@0.0.0

npm ERR! Found: vite@undefined

npm ERR! node_modules/vite

npm ERR!   dev vite@"^5.1.4" from the root project

npm ERR!

npm ERR! Could not resolve dependency:

npm ERR! peer vite@"^4.2.0 || ^5.0.0" from @vitejs/plugin-react@4.2.1

npm ERR! node_modules/@vitejs/plugin-react

npm ERR!   dev @vitejs/plugin-react@"^4.2.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!

npm ERR! For a full report see:

npm ERR! C:\User...

我已经尝试过错误提示里的--force和--legacy-peer-deps参数,但还是想先搞清楚为什么会先卡住这么久,而且npm ping也没反应,希望有经验的朋友能给我一些排查或解决的思路,谢谢大家!

备注:内容来源于stack exchange,提问作者Artem

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.04.17 10:13:13