Localized bundle generation failed: Unexpected return value from helper (expected a call expression)
See original GitHub issue🐞 bug report
Affected Package
The issue is caused by package @angular/localize
Is this a regression?
the previous version in which this bug was not present was: Angular 8.x
Description
After upgrading the app to angular 9 and then 10 when I run ng build appName --configuration=production
localy it works. But the issue accoures on the gitLab pipeline
🔥 Exception or Error
Localized bundle generation failed: Unexpected return value from helper (expected a call expression)
Angular Version:
Angular CLI: 10.0.6
Node: 12.14.1
OS: darwin x64
Angular: 10.0.10
... animations, common, compiler, compiler-cli, core, forms
... language-service, localize, platform-browser
... platform-browser-dynamic, router
Ivy Workspace: <error>
Package Version
------------------------------------------------------------
@angular-devkit/architect 0.803.15
@angular-devkit/build-angular 0.1000.6
@angular-devkit/build-optimizer 0.1000.6
@angular-devkit/build-webpack 0.1000.6
@angular-devkit/core 10.0.6
@angular-devkit/schematics 10.0.6
@angular/cdk 8.2.3
@angular/cli 10.0.6
@angular/flex-layout 9.0.0-beta.29
@angular/http 7.2.16
@angular/material 8.2.3
@angular/material-moment-adapter 8.2.3
@ngtools/webpack 10.0.6
@schematics/angular 8.3.29
@schematics/update 0.1000.6
rxjs 6.6.2
typescript 3.9.7
webpack
Anything else relevant?
import in pollyfills.ts:
/* Load
and package.json: $localize
onto the global scope - used if i18n tags appear in Angular templates.*/
import ‘@angular/localize/init’;“@angular/localize”: “^10.0.10”,
But in other hand, I’ am still not using $localize
in typescript and in HTML to implement the new i18n translation. I still keep the previous implementation for i18n translation. Using $localize will be the next step after getting rid of the this issue/error.
Issue Analytics
- State:
- Created 3 years ago
- Comments:35 (18 by maintainers)
Top GitHub Comments
Glad you got to the bottom of it!! Thanks for working with me on this.
I would say that you must update those
peerDependencies
directly. The Angular framework peer dependencies should update themselves automatically when usingng update @angular/core
since it contains information about how to do that. But if you have a library that has apeerDependency
, it would be up to you to do the update manually.