Eu encontrei este erro ao tentar executar npm install @nestjs/microservices :
# npm resolution error report
While resolving: [appName]
Found: @nestjs/[email protected]
node_modules/@nestjs/common
@nestjs/common@"^9.4.3" from the root project
Could not resolve dependency:
peer @nestjs/common@"^10.0.0" from @nestjs/[email protected]
node_modules/@nestjs/microservices
@nestjs/microservices@"*" from the root project
Fix the upstream dependency conflict, or retry
this command with --force or --legacy-peer-deps
to accept an incorrect (and potentially broken) dependency resolution.
Estas são minhas dependências em package.json:
"dependencies": {
"@nestjs/cache-manager": "^2.1.0",
"@nestjs/common": "^9.4.3",
"@nestjs/config": "^3.0.0",
"@nestjs/core": "^9.0.0",
"@nestjs/passport": "^10.0.0",
"@nestjs/platform-express": "^9.4.3",
"@nestjs/swagger": "^7.0.12",
"@nestjs/typeorm": "^10.0.0",
"bcryptjs": "^2.4.3",
"cache-manager": "^5.2.3",
"class-transformer": "^0.5.1",
"class-validator": "^0.14.0",
"dotenv": "^16.3.1",
"express-session": "^1.17.3",
"jsonwebtoken": "^9.0.0",
"passport": "^0.6.0",
"passport-google-oauth20": "^2.0.0",
"pg": "^8.11.1",
"reflect-metadata": "^0.1.13",
"rxjs": "^7.2.0",
"typeorm": "^0.3.17"
},
Tentei usar --legacy-peer-deps , mas não compila e não quero usar --force . Se alguém tiver ideia do que consertar, ficarei extremamente grato.