I'm trying to install new dependency to my service,
@nest/microservices: ^7.0.3 and got this error:
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: [email protected]
npm ERR! Found: @nestjs/[email protected]
npm ERR! node_modules/@nestjs/common
npm ERR! @nestjs/common@"^8.4.7" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer @nestjs/common@"^7.0.0" from @nestjs/[email protected]
npm ERR! node_modules/@nestjs/microservices
npm ERR! @nestjs/microservices@"^7.0.3" from the root project
npm ERR!
so versions of packages with problem are:
"@nestjs/common": "^8.4.7",
"@nestjs/core": "^7.6.15"
I tried to upgrade versions of core and microservices dependencies to ^8.0.0, and got more dependencies broken and also tried to downgrade common to ^7.6.15 and got same effect. Tried to use yarn instead of npm, it resolved my problem, but i need all packages to be installed by npm
CodePudding user response:
you can see the solution here, or at least this is what worked for me here. https://www.angularjswiki.com/angular/unable-to-resolve-dependency-tree-error-in-angular-while-installing-npm-packages/
I leave you the part where it worked for me
To fix Unable to resolve dependency tree error in Angular while installing npm packages follow the below steps.
- Run npm install --save --legacy-peer-deps instead of npm install command. Another way is delete node_modules folder and package_lock.json file and then
- run npm cache clean --force after npm i --force command.
CodePudding user response:
So, I resolved this problem, with deleting node_modules, package-lock.json and removing dependencies and devDependencies in package.json
After i've installed all dependencies manually one by one