sidedrawer.d.ts中的nativescript-ui-sidedrawer,找不到TKView,TKTheme等

时间:2019-08-02 22:54:44

标签: nativescript angular2-nativescript nativescript-plugin

我正在尝试使用Nativescript Sidekick在我的iPhone XS Max上运行tns预览/ tns运行ios -bundle。在Nativescript Playground中,我可以扫描QR码并预览nativescript angular应用程序。我不明白为什么我会有这么多错误。 访问https://play.nativescript.org/?template=play-ng&id=kfKgN2&v=383,以查看Nativescript操场上的nativescript角度代码工作。下载模板并使用Nativescript Sidekick打开应用程序后,我确认我的项目是{N} 6.0的最新版本,我运行了tns doctor,一切都很好。我启动的任何tns预览或tns运行命令都会给我完全相同的结果-错误代码。

Google根本没有建议我解决此问题。我确信这是一个简单的解决方法,我不想打扰任何人,但我只是想不通。我尝试过:

https://docs.nativescript.org/performance-optimizations/bundling-with-webpack https://docs.nativescript.org/tooling/docs-cli/project/configuration/platform-update https://www.npmjs.com/package/nativescript-pro-ui(已贬值) http://docs.telerik.com/devtools/nativescript-ui/migration 我已经卸载并安装了node_modules,平台和Nativescript cli。

npm缓存验证

我从2017年开始发现此问题 https://github.com/angular/angular-cli/issues/7078 但它与我的错误不完全匹配。 因为我没有至少10个声誉,所以我无法发布8个以上的链接。我删除了大约10条有关我研究和尝试过的所有内容的链接。

如上所述,从Nativescript Playground下载{N} Angular代码, 打开Nativescript Sidekick,运行tns运行ios --bundle和tns预览--bundle 对于tns运行android --bundle

,也会发生相同的错误

我想预览我的应用程序,除非我得到的页面充满了这些错误。

ERROR in app/nativescript-ui-sidedrawer/platforms/android/typings/sidedrawer.d.ts(521,129): error TS2694: Namespace 'android.support' has no exported member 'v7'.
app/nativescript-ui-sidedrawer/platforms/ios/typings/sidedrawer.d.ts(60,36): error TS2552: Cannot find name 'TKView'. Did you mean 'MTKView'?
app/nativescript-ui-sidedrawer/platforms/ios/typings/sidedrawer.d.ts(108,9): error TS2304: Cannot find name 'TKTheme'.
app/nativescript-ui-sidedrawer/platforms/ios/typings/sidedrawer.d.ts(175,48): error TS2304: Cannot find name 'TKTheme'.
app/nativescript-ui-sidedrawer/platforms/ios/typings/sidedrawer.d.ts(224,42): error TS2552: Cannot find name 'TKView'. Did you mean 'MTKView'?
app/nativescript-ui-sidedrawer/platforms/ios/typings/sidedrawer.d.ts(254,18): error TS2304: Cannot find name 'TKFill'.
app/nativescript-ui-sidedrawer/platforms/ios/typings/sidedrawer.d.ts(256,18): error TS2304: Cannot find name 'TKCoreStackLayout'.
app/nativescript-ui-sidedrawer/platforms/ios/typings/sidedrawer.d.ts(322,45): error TS2304: Cannot find name 'TKStyleNode'.
app/nativescript-ui-sidedrawer/platforms/ios/typings/sidedrawer.d.ts(330,8): error TS2304: Cannot find name 'TKFill'.
app/nativescript-ui-sidedrawer/platforms/ios/typings/sidedrawer.d.ts(336,18): error TS2304: Cannot find name 'TKFill'.
app/nativescript-ui-sidedrawer/platforms/ios/typings/sidedrawer.d.ts(338,10): error TS2304: Cannot find name 'TKStroke'.
app/nativescript-ui-sidedrawer/platforms/ios/typings/sidedrawer.d.ts(386,41): error TS2304: Cannot find name 'TKStyleNode'.
app/nativescript-ui-sidedrawer/platforms/ios/typings/sidedrawer.d.ts(632,18): error TS2304: Cannot find name 'TKCoreStackLayout'.
node_modules/nativescript-vue/index.d.ts(3,37): error TS2307: Cannot find module 'vue/types/vue'.

2 个答案:

答案 0 :(得分:0)

仅通过更新平台即可解决该问题:

library(dplyr)
library(purrr)
movsdf.rbind %>% 
      split(.$ActivityID) %>% 
      #Use map if you need the output as a list
      #instead of filter you can try slice(.x, n()) 
      map_df(~bind_rows(.x, filter(.x, row_number()==n())))

答案 1 :(得分:0)

我知道它很旧,但如果其他人遇到这个问题,这对我有帮助。

确保您的 tsconfig.json 包含 "skipLibCheck": true,如果您正在生成一个新项目,它似乎默认进入。

以下是我的 tsconfig 文件的示例:

{
  "compilerOptions": {
    "module": "esnext",
    "target": "es2017",
    "moduleResolution": "node",
    "experimentalDecorators": true,
    "emitDecoratorMetadata": true,
    "noEmitHelpers": true,
    "noEmitOnError": true,
    "skipLibCheck": true,
    "resolveJsonModule": true,
    "esModuleInterop": true,
    "lib": [
      "es2017",
      "dom"
    ],
    "baseUrl": ".",
    "paths": {
      "~/*": [
        "src/*"
      ]
    }
  },
  "exclude": [
    "node_modules",
    "platforms"
  ]
}