npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: fiora@1.0.0
npm ERR! Found: eslint@7.30.0
npm ERR! node_modules/eslint
npm ERR! dev eslint@"^7.30.0" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer eslint@"^5.0.0 || ^6.0.0" from @typescript-eslint/parser@2.34.0
npm ERR! node_modules/@typescript-eslint/parser
npm ERR! dev @typescript-eslint/parser@"^2.0.0" from the root project
npm ERR! peer @typescript-eslint/parser@"^2.0.0" from @typescript-eslint/eslint-plugin@2.34.0
npm ERR! node_modules/@typescript-eslint/eslint-plugin
npm ERR! dev @typescript-eslint/eslint-plugin@"^2.0.0" 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:\Users\10249\AppData\Local\npm-cache_logs\2024-01-04T02_42_31_621Z-eresolve-report.txt
解决方案
-
运行
npm install
命令时添加--force
选项,强制安装可能存在冲突的依赖项。 -
运行
npm install
命令时添加--legacy-peer-deps
选项,允许安装可能存在冲突的依赖项。