Romanchuk / angular-i18next

angular v10+ integration with i18next v19.4+
MIT License
131 stars 33 forks source link

Angular 8 RC4 - "export 'DOCUMENT' was not found in '@angular/platform-browser #30

Closed Timebutt closed 5 years ago

Timebutt commented 5 years ago

When using the RC versions of Angular 8, I'm getting this error when building the application using angular-18next version 6.0.1.

ERROR in /node_modules/angular-i18next/fesm5/angular-i18next.js 748:63-71
"export 'DOCUMENT' was not found in '@angular/platform-browser'

Are changes required here to make this package work with the latest instalment of Angular?

For reference, these are the Angular dependencies I am currently building with:

Angular CLI: 8.0.0-rc.4
Node: 11.13.0
OS: darwin x64
Angular: 8.0.0-rc.4
... animations, cli, common, compiler, compiler-cli, core, forms
... language-service, platform-browser, platform-browser-dynamic
... platform-server, router, service-worker

Package                            Version
------------------------------------------------------------
@angular-devkit/architect          0.800.0-rc.4
@angular-devkit/build-angular      0.800.0-rc.4
@angular-devkit/build-ng-packagr   0.800.0-rc.4
@angular-devkit/build-optimizer    0.800.0-rc.4
@angular-devkit/build-webpack      0.800.0-rc.4
@angular-devkit/core               8.0.0-rc.4
@angular-devkit/schematics         8.0.0-rc.4
@angular/cdk                       8.0.0-rc.1
@angular/http                      8.0.0-beta.10
@angular/material                  8.0.0-rc.1
@angular/pwa                       0.13.8
@ngtools/webpack                   8.0.0-rc.4
@schematics/angular                8.0.0-rc.4
@schematics/update                 0.800.0-rc.4
rxjs                               6.5.1
typescript                         3.4.5
webpack                            4.29.0
Timebutt commented 5 years ago

Ok, seems that DOCUMENT is deprecated from @angular/platform-browser, and should be imported from @angular/common (reference). I'll create a PR and fix this.

Romanchuk commented 5 years ago

@Timebutt Thank you, i'll check your PR soon

Romanchuk commented 5 years ago

PR accepted! Just released 6.1.0-beta version. Please try it and tell me if you have no issues with it.

npm install angular-i18next@beta

Timebutt commented 5 years ago

I already published my fix to a private npm repository to try it out and it worked great, you can release this as a new minor version.

Romanchuk commented 5 years ago

v6.1.0 released!