Updating from Angular 14 to 15 polyfills.ts issue

44 views Asked by At

I have updated my app (angular 14) to (angular 15)

I already perform this commands

ng update @angular/core@15 @angular/cli@15 --force
ng update @angular/material@15

When I run the app for checking

I got this error

Error: polyfills.ts:100:7 - error TS2717: Subsequent property declarations must have the same type.  Property 'providers' must be of type '(Provider | EnvironmentProviders)[]', but here has type 'Provider[]'.

Any idea what am I missing here?

Thank you!

1

There are 1 answers

0
VHS On BEST ANSWER

With Angular 15, the file polyfills.ts is neither generated nor required. You can update your polyfills configurations in the angular.json file. But regardless of where you keep your polyfills configurations, just make sure you use a consistent type for your provider property as explained in the error you are getting.