npm error peer eslint@“^6.0.0 || ^7.0.0 || ^8.0.0” from @typescript-eslint/parser@5.62.0?

发布于 2025-04-24 13:16:17

npm install yarn出现如下错误

(base) root@ZmnBDTestUbuntu:/opt/django-vue3-admin/web# npm install yarn
npm error code ERESOLVE
npm error ERESOLVE unable to resolve dependency tree
npm error
npm error While resolving: django-vue3-admin@3.1.0
npm error Found: eslint@9.25.1
npm error node_modules/eslint
npm error dev eslint@“^9.9.0” from the root project
npm error
npm error Could not resolve dependency:
npm error peer eslint@“^6.0.0 || ^7.0.0 || ^8.0.0” from @typescript-eslint/parser@5.62.0
npm error node_modules/@typescript-eslint/parser
npm error dev @typescript-eslint/parser@“^5.46.0” from the root project
npm error peer @typescript-eslint/parser@“^5.0.0” from @typescript-eslint/eslint-plugin@5.62.0
npm error node_modules/@typescript-eslint/eslint-plugin
npm error dev @typescript-eslint/eslint-plugin@“^5.46.0” from the root project
npm error
npm error Fix the upstream dependency conflict, or retry
npm error this command with --force or --legacy-peer-deps
npm error to accept an incorrect (and potentially broken) dependency resolution.
npm error
npm error
npm error For a full report see:
npm error /root/.npm/_logs/2025-04-24T02_53_10_680Z-eresolve-report.txt
npm error A complete log of this run can be found in: /root/.npm/_logs/2025-04-24T02_53_10_680Z-debug-0.log
(base) root@ZmnBDTestUbuntu:/opt/django-vue3-admin/web#

查看更多

关注者
0
被浏览
122
2 个回答
liflash
liflash 6天前
这家伙很懒,什么也没写!

package.json 里面
"@typescript-eslint/eslint-plugin": "^8.0.0",
"@typescript-eslint/parser": "^8.0.0",
这里 ,我把配置的版本改成这样 通过了,我也是新手 ,按照说明安装太多错误,感觉没人管这块 安装写的很随意

lqfrank
lqfrank 4天前
这家伙很懒,什么也没写!

谢谢回复,我后面也是通过AI找到了这个客案的

撰写答案

请登录后再发布答案,点击登录

发布
问题

分享
好友

手机
浏览

扫码手机浏览