Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
simdevmon opened this issue Sep 3, 2019 · 5 comments
Closed

Comments

@simdevmon
Copy link

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
@wartab
Copy link

wartab commented Sep 4, 2019

It's been a while, but I have the same issue since the upgrade to angular-cli 8.3.

@ibrcic
Copy link

ibrcic commented Sep 4, 2019

I have the same issue, anyone found a solution?

@dschwank
Copy link

dschwank commented 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: angular/angular#32333

@simdevmon
Copy link
Author

Thank you @dschwank . This was working for me.

@lukengda
Copy link

lukengda commented 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…

ocombe pushed a commit that referenced this issue Sep 11, 2019
DanielHabenicht added a commit to T-Systems-MMS/phonebook that referenced this issue Sep 13, 2019
DanielHabenicht pushed a commit to T-Systems-MMS/phonebook that referenced this issue Sep 13, 2019
* chore(deps): update angularcli monorepo

* trans(ngx-translate): translation erroring

See ngx-translate/i18n-polyfill#60
maxsv0 added a commit to maxsv0/mega-iq-ui that referenced this issue Dec 25, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants