question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Angular v9: ng add @angular/localize doesn't fix error after update from 8 to 9

See original GitHub issue

I have the same issue https://github.com/angular/angular-cli/issues/16890 updated angular version from 8 to 9 before update

 Angular CLI: 8.3.24
Node: 12.18.3
OS: win32 x64
Angular:
...

Package                      Version
------------------------------------------------------
@angular-devkit/architect    0.803.24
@angular-devkit/core         8.3.24
@angular-devkit/schematics   8.3.24
@schematics/angular          8.3.24
@schematics/update           0.803.24
rxjs                         6.4.0

after updated to version 9:

Angular CLI: 9.1.12
Node: 12.18.3
OS: win32 x64

Angular: 9.1.12
... animations, cli, common, compiler, compiler-cli, core, forms
... language-service, localize, platform-browser
... platform-browser-dynamic, router
Ivy Workspace: Yes

Package                           Version
-----------------------------------------------------------
@angular-devkit/architect         0.901.12
@angular-devkit/build-angular     0.901.12
@angular-devkit/build-optimizer   0.901.12
@angular-devkit/build-webpack     0.901.12
@angular-devkit/core              9.1.12
@angular-devkit/schematics        9.1.12
@angular/cdk                      8.2.3
@angular/http                     5.2.11
@angular/material                 8.2.3
@ngtools/webpack                  9.1.12
@schematics/angular               9.1.12
@schematics/update                0.901.12
rxjs                              6.6.2
typescript                        3.8.3

ng serve not giving any compilation issues. but on browser this error is shown

image

tried this command ‘ng add @angular/localize’ still not working

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:11 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
petebacondarwincommented, Aug 25, 2020

The CLI should not be removing the $localize polyfill import if not doing compile-time localization, unless it could be shown that there are no $localize tagged strings in the bundled files.

0reactions
angular-automatic-lock-bot[bot]commented, Sep 26, 2020

This issue has been automatically locked due to inactivity. Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Add the localize package - Angular
To add the @angular/localize package, use the following command to update the package. json and polyfills. ts files in your project.
Read more >
Angular 9 introduced a global '$localize()' function that needs ...
I'm getting the following error in my new angular project setup. ERROR Error: Uncaught (in promise): Error: It looks like your application or ......
Read more >
Internationalization with @angular/localize | Ninja Squad
Angular 9 introduced a global `$localize()` function that needs to be loaded. Please run `ng add @angular/localize` from the Angular CLI.
Read more >
module not found: error: can't resolve '@angular/localize/init'
The easy workaround I found was to use TypeScript path mapping: Create an empty file src/empty.ts. Add the "paths" property to the tsconfig.json...
Read more >
All Perks, No Hassle: An Angular 9 Tutorial - Toptal
npm install -g @angular/cli. We can verify the Angular CLI version by running ng version . Next, let's create an Angular application: ng...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found