1

我正在使用带有角度的nativescript。安装 nativescript-ui-listview 插件后出现此错误

工人 #1 错误:错误:在非 ES5 类上调用 getInternalNameOfClass():预期 RadListViewComponent 具有内部类声明

在运行应用程序时。

带有警告:

警告: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:注入,参数:[NativeScriptRendererFactory,] }] } ]

需要帮忙

下面是我的包 Json 文件

 {
   "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"
 }
4

1 回答 1

2

将from更改compilerOptions为对我来说效果很好,你可以试试tsconfig.jsones5es2015

于 2020-11-27T00:50:56.617 回答