0

I'm building this project with Angular and when "ng adding" Angular Universal, this dependency error occurs:

$ ng add @nestjs/ng-universal                                                                                                              
ℹ Using package manager: npm
✔ Found compatible package version: @nestjs/ng-universal@7.0.0.
✔ Package information loaded.

The package @nestjs/ng-universal@7.0.0 will be installed and executed.
Would you like to proceed? Yes
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR! 
npm ERR! While resolving: toqueteando@0.0.0
npm ERR! Found: @angular/animations@15.2.4
npm ERR! node_modules/@angular/animations
npm ERR!   @angular/animations@"15.2.4" from the root project
npm ERR! 
npm ERR! Could not resolve dependency:
npm ERR! peer @angular/animations@"15.2.8" from @angular/platform-server@15.2.8
npm ERR! node_modules/@angular/platform-server
npm ERR!   peer @angular/platform-server@"^12.0.0 || ^13.0.0 || ^14.0.0 || ^15.0.0" from @nestjs/ng-universal@7.0.0
npm ERR!   node_modules/@nestjs/ng-universal
npm ERR!     @nestjs/ng-universal@"7.0.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!
npm ERR! See C:\Users\Ferra\AppData\Local\npm-cache\eresolve-report.txt for a full report.

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\Ferra\AppData\Local\npm-cache\_logs\2023-04-29T11_48_03_200Z-debug-0.log
✖ Packages installation failed, see above.

I tried deleting package-lock and node_modules and I changed all @angular dependencies to 15.2.1 (the latest Angular Universal release version) without success. This [NestJs version] (https://github.com/nestjs/ng-universal) gives me the same problem. I just don't know how to solve this problem. Thanks in advance.

ferran
  • 100
  • 2
  • 8

0 Answers0