nativescript - 错误:在非 ES5 类上调用 getInternalNameOfClass():预期 RadListViewComponent 具有内部类声明
问题描述
我正在使用带有角度的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"
}
解决方案
将from更改compilerOptions
为对我来说效果很好,你可以试试tsconfig.json
es5
es2015
推荐阅读
- python - 如何选择模糊匹配算法?
- kubernetes - WSO2 API 管理器 - 重新创建 pod 后缺少 API
- codeigniter - 如何通过分页显示连续编号的数据
- installshield - 在另一个程序的文件夹中安装组件
- bash - 如何在特定行的特定列中插入消息变量
- mysql - "SELECT * FROM view_table WHERE cause" => 但结果总是重新排序
- r - 如何在ggplot中将Y轴上的数字隔开
- javascript - 有没有办法在我的 Vue 代码中使用 javascript 创建一个字符串资源文件?
- javascript - 如果子按钮为绿色,则更改主按钮颜色
- javascript - 如何在 Google Chart 中反映 addRows 下的函数输出