ERROR in getInternalNameOfClass() called on a non-ES5 class: expected TranslateFakeLoader to have an inner class declaration

Viewed 6896

I'm using angular v9 "@angular/core": "9.0.6", after installing "@ngx-translate/core" and "@ngx-translate/http-loader", I got this error "ERROR in getInternalNameOfClass() called on a non-ES5 class: expected TranslateFakeLoader to have an inner class declaration" while running the app.

"@angular/core": "9.0.6"
"@ngx-translate/core": "^13.0.0",
"@ngx-translate/http-loader": "^6.0.0",

Please any idea how to fix this?

2 Answers

Try changing target in the compilerOptions of your tsconfig.json from es5 to es2015

You use Angular in version 9+ and install @ngx-translate/core 13, @ngx-translate/http-loader 6. This versions of ngx-translate are specific for angular 10, install ngx-translate/core 12 and ngx-translate/http-loader 5. Specific version of ngx for version of angular you have in table Installanion on https://github.com/ngx-translate/core

Related