【发布时间】:2022-11-15 13:04:29
【问题描述】:
运行npx npm-check-updates -u 后,我尝试运行npm install,并收到以下消息:
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! Found: @nestjs/typeorm@8.0.3
npm ERR! node_modules/@nestjs/typeorm
npm ERR! @nestjs/typeorm@"^8.1.4" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! @nestjs/typeorm@"^8.1.4" from the root project
npm ERR!
npm ERR! Conflicting peer dependency: typeorm@0.3.6
npm ERR! node_modules/typeorm
npm ERR! peer typeorm@"^0.3.0" from @nestjs/typeorm@8.1.4
npm ERR! node_modules/@nestjs/typeorm
npm ERR! @nestjs/typeorm@"^8.1.4" 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.
我搜索过,看到人们建议只使用 --legacy-peer-deps 或 --force,但应该这样解决吗?还是我应该手动解决问题?
我尝试搜索有关如何解决依赖关系树错误的指南,但找不到任何内容。你能给我一些指导,我应该从哪里开始解决错误。
【问题讨论】:
-
你找到解决办法了吗? @nestjs/typeorm 从8.1.0 开始使用 0.3 版本,所以它应该可以工作但没有。
标签: node.js npm nestjs node-modules npm-install