【问题标题】:ngx-uploader: TS2339: Property 'lastModifiedDate' does not exist on type 'File'ngx-uploader:TS2339:“文件”类型上不存在属性“lastModifiedDate”
【发布时间】:2019-11-24 19:18:10
【问题描述】:

错误 node_modules/ngx-uploader/src/ngx-uploader/classes/ngx-uploader.class.ts(112,32): 错误 TS2339:类型上不存在属性“lastModifiedDate” '文件'。

我在将 Angular 应用程序从 5.2 版升级到 8 版时遇到此错误。 我相信这是因为较新版本的 typescript 已弃用该字段,而支持引入的新字段 lastModified

有什么方法可以克服这个错误而不依赖库来更新?

我目前的应用配置是:

Angular: 8.1.1
@angular-devkit/architect         0.13.9
@angular-devkit/build-angular     0.13.9
@angular-devkit/build-optimizer   0.13.9
@angular-devkit/build-webpack     0.13.9
@angular-devkit/core              7.3.9
@angular-devkit/schematics        7.3.9
@angular/cli                      7.3.9
@ngtools/webpack                  7.3.9
@schematics/angular               7.3.9
@schematics/update                0.13.9
rxjs                              6.5.2
typescript                        3.4.5
webpack                           4.29.0

【问题讨论】:

    标签: javascript angular npm angular-cli ngx-uploader


    【解决方案1】:

    安装最新版本的 ngx-uploader。 npm install ngx-uploader@latest

    【讨论】:

      猜你喜欢
      • 2019-02-13
      • 2020-10-07
      • 2022-07-02
      • 2017-08-15
      • 2021-01-09
      • 2021-07-10
      • 2021-05-29
      • 2021-06-18
      相关资源
      最近更新 更多