我下载一个开源项目研究,发现有peer esbuild@"^0.14.x || ^0.15.0 || ^0.16.0 || ^0.17.0" from esbuild-plugin-less@1.2.0
这样的报错:
npm ERR! code ERESOLVE
npm ERR! ERESOLVE could not resolve
npm ERR!
npm ERR! While resolving: esbuild-plugin-less@1.2.0
npm ERR! Found: esbuild@0.12.29
npm ERR! node_modules/esbuild
npm ERR! esbuild@"^0.12.15" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer esbuild@"^0.14.x || ^0.15.0 || ^0.16.0 || ^0.17.0" from esbuild-plugin-less@1.2.0
npm ERR! node_modules/esbuild-plugin-less
npm ERR! esbuild-plugin-less@"^1.0.7" from the root project
npm ERR!
npm ERR! Conflicting peer dependency: esbuild@0.17.17
npm ERR! node_modules/esbuild
npm ERR! peer esbuild@"^0.14.x || ^0.15.0 || ^0.16.0 || ^0.17.0" from esbuild-plugin-less@1.2.0
npm ERR! node_modules/esbuild-plugin-less
npm ERR! esbuild-plugin-less@"^1.0.7" 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 /Users/markleo/.npm/eresolve-report.txt for a full report.
但是我在package.json中并没有看到有任何的eslint的依赖库:
在package.json中没有依赖库,为何这里还有依赖冲突呢?需要如何才能解决?
可以用npm why 包名,这样方式查是怎么引进来的