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.

TypeError after updating "@angular-devkit/build-angular to 0.803.2

See original GitHub issue

I use "@ngx-translate/i18n-polyfill": "1.0.0" together with Angular 8.2.4 and it is working fine so far with:

    "@angular-devkit/build-angular": "0.802.2",
    "@angular/cli": "^8.2.2",

When I update to and start my application with ng serve --aot

    "@angular-devkit/build-angular": "0.803.2",
    "@angular/cli": "^8.3.2",

I get the following error when trying to access the application in the browser:

ERROR Error: Uncaught (in promise): TypeError: this._input.charCodeAt is not a function
TypeError: this._input.charCodeAt is not a function
    at Tokenizer._advance (ngx-translate-i18n-polyfill.js:1256)
    at new Tokenizer (ngx-translate-i18n-polyfill.js:1111)
    at tokenize (ngx-translate-i18n-polyfill.js:1062)
    at Parser.parse (ngx-translate-i18n-polyfill.js:1909)
    at Xliff2Parser.parse (ngx-translate-i18n-polyfill.js:3382)
    at xliff2LoadToI18n (ngx-translate-i18n-polyfill.js:3359)
    at Function.load (ngx-translate-i18n-polyfill.js:6389)
    at new I18n (ngx-translate-i18n-polyfill.js:6939)
    at _createClass (core.js:30471)
    at _createProviderInstance (core.js:30425)
    at resolvePromise (zone-evergreen.js:797)
    at resolvePromise (zone-evergreen.js:754)
    at zone-evergreen.js:858
    at ZoneDelegate.invokeTask (zone-evergreen.js:391)
    at Object.onInvokeTask (core.js:39679)
    at ZoneDelegate.invokeTask (zone-evergreen.js:390)
    at Zone.runTask (zone-evergreen.js:168)
    at drainMicroTaskQueue (zone-evergreen.js:559)

2019-09-03_14h06_22

Angular CLI: 8.3.2
Node: 10.16.0
OS: win32 x64
Angular: 8.2.4
... animations, common, compiler, compiler-cli, core, forms
... platform-browser, platform-browser-dynamic, router

Package                           Version
-----------------------------------------------------------
@angular-devkit/architect         0.803.2
@angular-devkit/build-angular     0.803.2
@angular-devkit/build-optimizer   0.803.2
@angular-devkit/build-webpack     0.803.2
@angular-devkit/core              8.3.2
@angular-devkit/schematics        8.3.2
@angular/cdk                      8.1.4
@angular/cli                      8.3.2
@ngtools/webpack                  8.3.2
@schematics/angular               8.3.2
@schematics/update                0.803.2
rxjs                              6.5.2
typescript                        3.5.3
webpack                           4.39.2

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:8
  • Comments:5

github_iconTop GitHub Comments

41reactions
dschwankcommented, Sep 4, 2019

The raw-loader changed. You have to use .default when requiring the xlf file.

const translations = require('raw-loader!./i18n/messages.ko.xlf').default;

See: https://github.com/angular/angular/issues/32333

0reactions
lukengdacommented, Sep 4, 2019

The readme.md should note those changes. The raw-loader example here is just showing the 8.0.0 way. Maybe we should provide both versions for now, I just followed the instructions here in the repo and ran into this problem…

Read more comments on GitHub >

github_iconTop Results From Across the Web

Can not find module “@angular-devkit/build-angular” [duplicate]
Running ng serve --open after creating and going into my new project "frontend" gave this error: After creating the project, you need to...
Read more >
0.803.29 - @angular-devkit/build-angular - npm
Start using @angular-devkit/build-angular in your project by running `npm i @angular-devkit/build-angular`. There are 197 other projects in ...
Read more >
Angular CLI builders
This document explains how CLI builders integrate with the workspace configuration file, and shows how you can create your own builder. Find the...
Read more >
@angular-devkit/build-angular - npm package | Snyk
The npm package @angular-devkit/build-angular was scanned for known vulnerabilities and missing license, and no issues were found. Thus the package was deemed ...
Read more >
Ionic5 prod build fails - Ionic Forum
js Module build failed (from ./node_modules/@angular-devkit/build-optimizer/src/build-optimizer/webpack-loader.js): TypeError: Cannot read ...
Read more >

github_iconTop Related Medium Post

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