【问题标题】:platform.js:78 Uncaught TypeError: Class constructor Platform cannot be invoked without 'new'platform.js:78 Uncaught TypeError:没有'new'就不能调用类构造函数平台
【发布时间】:2020-06-25 08:34:02
【问题描述】:

我有一个用 Javascript ES2015 编写的课程。当我尝试执行 nodemon 命令时,我总是看到这个错误 TypeError: Class constructor Platform cannot be invoked without 'new'

运行时错误期间的完整错误如下所述: [https://i.stack.imgur.com/2oB6W.png][1]

但我得到了编译时成功 [https://i.stack.imgur.com/oaRkj.png][1]

【问题讨论】:

  • 请将您的代码或错误消息添加为文本而不是图像。这样我们就可以更轻松、更快速地为您提供帮助。

标签: asp.net-web-api2 angular9 sql-server-2017


【解决方案1】:

在您的 app.module.ts 文件中存在一个问题,其中包含对 platform 的引用,而没有 newing 它。

【讨论】:

    猜你喜欢
    • 2018-11-12
    • 2019-04-21
    • 2021-05-17
    • 2021-12-27
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2020-01-04
    • 2021-05-24
    相关资源
    最近更新 更多