首页 > 解决方案 > platform.js:78 Uncaught TypeError:没有'new'就不能调用类构造函数平台

问题描述

我有一个用 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-api2angular9sql-server-2017

解决方案


您的文件中有一个问题,app.module.ts其中包含对platformwithout newing 的引用。


推荐阅读