Simple Fellow
Simple Fellow

Reputation: 4622

Installing nest/terminus gives dependency tree error

Whenever I try to install nest/terminus

npm i @nestjs/terminus

I get the following error

npm ERR! code ERESOLVE
npm ERR! ERESOLVE could not resolve
npm ERR! npm ERR! While resolving: [email protected]
npm ERR! Found: [email protected]
npm ERR! node_modules/ioredis
npm ERR! peer ioredis@"^4.0.0" from @nestjs-modules/[email protected]
npm ERR! node_modules/@nestjs-modules/ioredis
npm ERR! @nestjs-modules/ioredis@"^1.0.1" from the root project
npm ERR! ioredis@"^4.28.5" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peerOptional ioredis@"^5.0.4" from [email protected]
npm ERR! node_modules/typeorm
npm ERR! peertypeorm@"^0.3.0" from @nestjs/[email protected] npm ERR! node_modules/@nestjs/typeorm npm ERR! @nestjs/typeorm@"^8.1.4" from the root project npm ERR! typeorm@"^0.3.7" from the root project npm ERR! npm ERR! Conflicting peer dependency: [email protected] npm ERR! node_modules/ioredis npm ERR! peerOptional ioredis@"^5.0.4" from [email protected] npm ERR! node_modules/typeorm npm ERR! peer typeorm@"^0.3.0" from @nestjs/[email protected] npm ERR! node_modules/@nestjs/typeorm npm ERR! @nestjs/typeorm@"^8.1.4" from the root project npm ERR! typeorm@"^0.3.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.

I tried running the following command

npm install --save --legacy-peer-deps

it ran okay, but on repeating the terminus installation I got the same error. Any idea what I might be doing wrong?

Upvotes: 0

Views: 734

Answers (1)

Moses Kirathe
Moses Kirathe

Reputation: 332

From the error log it looks like nestjs/terminus was missing the ioredis peer dependency. You were on [email protected] while [email protected] required [email protected] or higher. Can resolve this by bumping the ioredis dependency.

Upvotes: 0

Related Questions