Error: getInternalNameOfClass() called on a non-ES5 class: expected RadListViewComponent to have an inner class declaration

3.8k views Asked by At

I'm using nativescript with angular. After installing nativescript-ui-listview plugin I got this error

Error on worker #1: Error: getInternalNameOfClass() called on a non-ES5 class: expected RadListViewComponent to have an inner class declaration

while running the app.

With a Warning:

Warning: Invalid constructor parameter decorator in C:/Users/rashi/FNFtoursapp/node_modules/nativescript-ui-listview/angular/fesm2015/nativescript-ui-listview-angular.js: () => [ { type: ElementRef, decorators: [{ type: Inject, args: [ElementRef,] }] }, { type: IterableDiffers, decorators: [{ type: Inject, args: [IterableDiffers,] }] }, { type: NativeScriptRendererFactory, decorators: [{ type: Inject, args: [NativeScriptRendererFactory,] }] } ]

Need Help

Below is My Package Json File

 {
   "nativescript": {
     "id": "org.nativescript.FNFtoursapp",
     "tns-ios": {
       "version": "6.5.0"
     },
     "tns-android": {
       "version": "6.5.3"
     }
   },
   "description": "NativeScript Application",
   "license": "SEE LICENSE IN <your-license-filename>",
   "repository": "<fill-your-repository-here>",
   "scripts": {
     "ngcc": "ngcc --properties es2015 module main --first-only",
     "postinstall": "npm run ngcc"
   },
   "dependencies": {
     "@angular/animations": "~9.1.0",
     "@angular/common": "~9.1.0",
     "@angular/compiler": "~9.1.0",
     "@angular/core": "~9.1.0",
     "@angular/forms": "~9.1.0",
     "@angular/platform-browser": "~9.1.0",
     "@angular/platform-browser-dynamic": "~9.1.0",
     "@angular/router": "~9.1.0",
     "@nativescript/angular": "~9.0.0",
     "@nativescript/theme": "~2.3.0",
     "@nstudio/nativescript-checkbox": "^1.0.0",
     "nativescript-cardview": "^3.2.0",
     "nativescript-plugin-firebase": "^10.5.2",
     "nativescript-ui-listview": "^9.0.2",
     "reflect-metadata": "~0.1.12",
     "rxjs": "^6.5.0",
     "tns-core-modules": "~6.5.0",
     "zone.js": "~0.10.3"
   },
   "devDependencies": {
     "@angular/compiler-cli": "~9.1.0",
     "@ngtools/webpack": "~9.1.0",
     "nativescript-dev-webpack": "~1.5.0",
     "tns-platform-declarations": "~6.5.0",
     "typescript": "~3.8.3"
   },
   "readme": "NativeScript Application"
 }
1

There are 1 answers

0
coocier On BEST ANSWER

changing compilerOptions of tsconfig.json from es5 to es2015 works fine with me, you can try