Reputation: 1819
I've added the @angular/localize package during an update from Angular 8 to 9. My polyfill.ts has the following import:
import '@angular/localize/init';
My app is compiling and spinning up fine on a browser locally but when I run a production build I'm getting the following error:
Any idea what isn't being resolved here? I can see the module installed correctly in the node_modules/@angular/localize directory.
Upvotes: 2
Views: 12800
Reputation: 2078
Make sure that npm has installed appropriate version of @angular/localize! By default it installs the most latest, although for Angular 9 you need @angular/localize of version 9. That was the root cause of the issue in my case. This helped:
npm install --save @angular/[email protected]
Upvotes: 2
Reputation: 1175
Run this command in terminal if you are using npm
npm install @angular/localize --save
or if you are using Yarn
yarn add @angular/localize
Upvotes: 7