2

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:

enter image description here

Any idea what isn't being resolved here? I can see the module installed correctly in the node_modules/@angular/localize directory.

2 Answers 2

7

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
Sign up to request clarification or add additional context in comments.

Comments

2

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]

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.