【问题标题】:error TS1183: An implementation cannot be declared in ambient contexts错误 TS1183:无法在环境上下文中声明实现
【发布时间】:2019-05-09 19:25:33
【问题描述】:

我正在处理一个有角度的项目。我以为一切都好。但有如下错误。它是如何发生的,这对我来说是个麻烦。如果有人知道,我非常感谢您的支持

ERROR in node_modules/@angular/material/card/typings/card module.d.ts(12,55): error TS1183: An implementation cannot be declared in ambient contexts.node_modules/@angular/material/card/typings/cardmodule.d.ts(20,55):error TS1183: An implementation cannot be declared in ambient contexts.

那我该怎么办

【问题讨论】:

  • 您可以尝试重新安装角材料吗? npm install @angular/material @angular/cdk @angular/animations
  • 你是如何导入CardModule的?

标签: angular


【解决方案1】:

你必须从项目中删除你的 node_module 文件夹并使用 npm install 重新安装 它会为你工作

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2016-09-23
    • 2020-08-16
    • 2021-07-09
    • 2020-07-29
    • 2020-03-07
    • 2020-06-17
    相关资源
    最近更新 更多