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.

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 $localize onto the global scope - used if i18n tags appear in Angular templates.*/ import ‘@angular/localize/init’; and package.json: @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:closed
  • Created 3 years ago
  • Comments:35 (18 by maintainers)

github_iconTop GitHub Comments

1reaction
petebacondarwincommented, Aug 24, 2020

Glad you got to the bottom of it!! Thanks for working with me on this.

1reaction
petebacondarwincommented, Aug 24, 2020

I would say that you must update those peerDependencies directly. The Angular framework peer dependencies should update themselves automatically when using ng update @angular/core since it contains information about how to do that. But if you have a library that has a peerDependency, it would be up to you to do the update manually.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Angular 10.2 build: Localized bundle generation failed
I have an Angular 11 project with es2015 in target without any problems, so I am not able to verify this. · Do...
Read more >
this expression is not callable. angular - You.com
This expression is not callable, Type 'UserService' has no call signatures ... Localized bundle generation failed: Unexpected return value from helper ...
Read more >
Changelog - Cypress Documentation
Cypress will now throw an error when we receive an unexpected return value from a custom config file. Fixes #21948. Cypress will now...
Read more >
Apache Tomcat 8 (8.5.84) - Changelog
getMethodInfo() so that it returns the expected value rather than failing when the method expression is defined with the parameter values in ...
Read more >
17. Web MVC framework - Spring
With the above Servlet configuration in place, you will need to have a file called /WEB-INF/ golfing -servlet.xml in your application; this file...
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