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