Atualizei meu antigo projeto angular da versão 10 para a 19 passo a passo ( https://angular.dev/update-guide ). Agora, após a atualização, tudo está funcionando bem. O único problema que estou enfrentando é que para instalar o novo npm, tenho que usar o comando "--force". Sem o comando "--force", estou recebendo o erro abaixo:
npm error code ERESOLVE
npm error ERESOLVE could not resolve
npm error
npm error While resolving: [email protected]
npm error Found: @angular/[email protected]
npm error node_modules/@angular/core
npm error peer @angular/core@"19.2.5" from @angular/[email protected]
npm error node_modules/@angular/animations
npm error peerOptional @angular/animations@"19.2.5" from @angular/[email protected]
npm error node_modules/@angular/platform-browser
npm error peer @angular/platform-browser@"19.2.5" from @angular/[email protected]
npm error node_modules/@angular/forms
npm error peer @angular/forms@"^19.0.0 || ^20.0.0" from @angular/[email protected]
npm error node_modules/@angular/material
npm error 4 more (ngx-bootstrap, ngx-intl-tel-input, primeng, the root project)
npm error 6 more (@angular/material, ...)
npm error peer @angular/animations@"^19.0.1" from [email protected]
npm error node_modules/ngx-bootstrap
npm error peer ngx-bootstrap@">= 12.0.0" from [email protected]
npm error node_modules/ngx-intl-tel-input
npm error ngx-intl-tel-input@"^17.0.0" from the root project
npm error 1 more (the root project)
npm error 3 more (ngx-spinner, primeng, the root project)
npm error peer @angular/core@"^19.0.0 || ^20.0.0" from @angular/[email protected]
npm error node_modules/@angular/cdk
npm error peer @angular/cdk@"19.2.8" from @angular/[email protected]
npm error node_modules/@angular/material
npm error @angular/material@"^19.2.8" from the root project
npm error peer @angular/cdk@">=13.0.0" from [email protected]
npm error node_modules/ngx-scrollbar
npm error ngx-scrollbar@"^9.0.0" from the root project
npm error 2 more (primeng, the root project)
npm error 21 more (@angular/common, @angular/forms, @angular/material, ...)
npm error
npm error Could not resolve dependency:
npm error peer @angular/core@"^17.0.0" from [email protected]
npm error node_modules/ng-recaptcha
npm error ng-recaptcha@"^13.2.1" from the root project
npm error
npm error Conflicting peer dependency: @angular/[email protected]
npm error node_modules/@angular/core
npm error peer @angular/core@"^17.0.0" from [email protected]
npm error node_modules/ng-recaptcha
npm error ng-recaptcha@"^13.2.1" from the root project
npm error
npm error Fix the upstream dependency conflict, or retry
npm error this command with --force or --legacy-peer-deps
npm error to accept an incorrect (and potentially broken) dependency resolution.
Por favor, deixe-me saber o que está errado com a atualização. Devo assumir que minha atualização foi feita corretamente e não causará nenhum problema no futuro.
Obrigado