In our code, we use node 14.17.6 and want to upgrade v18.16.1. But when we upgrade and run npm install
it is showing following error:
npm ERR! code ERESOLVE
npm ERR! ERESOLVE could not resolve
npm ERR!
npm ERR! While resolving: @nestjs/graphql@10.1.1
npm ERR! Found: ts-morph@10.1.0
npm ERR! node_modules/ts-morph
npm ERR! ts-morph@"^10.0.1" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peerOptional ts-morph@"^13.0.2 || ^14.0.0 || ^15.0.0" from @nestjs/graphql@10.1.1
npm ERR! node_modules/@nestjs/graphql
npm ERR! @nestjs/graphql@"^10.1.1" from the root project
npm ERR! peer @nestjs/graphql@"^10.0.0" from @nestjs/apollo@10.1.0
npm ERR! node_modules/@nestjs/apollo
npm ERR! @nestjs/apollo@"^10.1.0" from the root project
npm ERR!
npm ERR! Conflicting peer dependency: ts-morph@15.1.0
npm ERR! node_modules/ts-morph
npm ERR! peerOptional ts-morph@"^13.0.2 || ^14.0.0 || ^15.0.0" from @nestjs/graphql@10.1.1
npm ERR! node_modules/@nestjs/graphql
npm ERR! @nestjs/graphql@"^10.1.1" from the root project
npm ERR! peer @nestjs/graphql@"^10.0.0" from @nestjs/apollo@10.1.0
npm ERR! node_modules/@nestjs/apollo
npm ERR! @nestjs/apollo@"^10.1.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!
I have updated ts-morph
from 10.1.0
to 13.0.2
. But not working, it then showing other dependency error.
our current version:
"@apollo/gateway": "^2.1.1",
"@nestjs/apollo": "^10.1.0",
"@nestjs/common": "^9.0.11",
"@nestjs/config": "^2.2.0",
"@nestjs/core": "^9.0.11",
"@nestjs/graphql": "^10.1.1",
"@newrelic/apollo-server-plugin": "^2.0.1",
"apollo-server-express": "^3.10.2",
"apollo-server-plugin-query-complexity": "^1.0.0",
"graphql": "^16.6.0",
I have also used ncu
and try following ncu -u
. It is updating all npm package version. Then run npm i
, but not working.
It shows following result:
npm ERR! code ERESOLVE
npm ERR! ERESOLVE could not resolve
npm ERR!
npm ERR! While resolving: user-service@0.0.1
npm ERR! Found: @nestjs/apollo@10.1.0
npm ERR! node_modules/@nestjs/apollo
npm ERR! @nestjs/apollo@"^12.0.7" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! @nestjs/apollo@"^12.0.7" from the root project
npm ERR!
npm ERR! Conflicting peer dependency: @nestjs/common@10.1.0
npm ERR! node_modules/@nestjs/common
npm ERR! peer @nestjs/common@"^9.3.8 || ^10.0.0" from @nestjs/apollo@12.0.7
npm ERR! node_modules/@nestjs/apollo
npm ERR! @nestjs/apollo@"^12.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.