【问题标题】:Angular project Build successfully but giving these errorsAngular 项目构建成功但出现这些错误
【发布时间】:2018-10-12 12:22:50
【问题描述】:

它在项目运行和构建后向我显示这些错误

style.d.ts(72,67): error TS1144: '{' or ';' expected.
node_modules/@angular/flex-layout/extended/typings/style/style.d.ts(74,5): error TS1128: Declaration or statement expected.
node_modules/@angular/flex-layout/extended/typings/style/style.d.ts(74,33): error TS1005: ';' expected.
node_modules/@angular/flex-layout/extended/typings/style/style.d.ts(74,39): error TS1109: Expression expected.
node_modules/@angular/flex-layout/extended/typings/style/style.d.ts(79,5): error TS1128: Declaration or statement expected.
node_modules/@angular/flex-layout/extended/typings/style/style.d.ts(80,1): error TS1128: Declaration or statement expected.

谁能指导我如何解决这个问题?

【问题讨论】:

标签: javascript angular typescript


【解决方案1】:

你需要重新安装 flax-layout

npm uninstall @angular/flex-layout --save

 npm install @angular/flex-layout@6.0.0.15-beta --save 

【讨论】:

    【解决方案2】:

    在终端执行:tsc -v

    此时,最新版本应该是:3.0.3

    如果不是,您的 typescript 版本有问题参考。

    【讨论】:

      猜你喜欢
      • 2016-10-03
      • 2021-02-20
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2016-10-05
      • 2012-03-30
      • 2020-05-28
      相关资源
      最近更新 更多