【问题标题】:Got an error that is "Uncaught (in promise) TypeError: object is not a constructor(…)"收到错误消息“未捕获(在承诺中)TypeError:对象不是构造函数(...)”
【发布时间】:2016-03-23 18:44:53
【问题描述】:

当使用“ionic serve”命令在浏览器上打开应用程序时,出现以下错误,请帮忙检查一下吗?谢谢!

请参考我在https://github.com/aaronchen2k/mobistore-client/tree/master/app的代码

【问题讨论】:

  • 请贴出出现错误的具体代码片段。浏览器控制台中的堆栈跟踪将包含文件名和行号。
  • 找不到原因,因为我只收到以下消息:Angular 2 正在开发模式下运行。调用 enableProdMode() 以启用生产模式。 undefined:1 Uncaught (in promise) TypeError: object is not a constructor(...) app.bundle.js:62129 localhost:8080/ms/api/v1/home/index app.bundle.js:62136 Object {code: 1, data: Object} app.bundle.js :51268 swiper initEvents 附加

标签: typescript ionic2


【解决方案1】:

问题来自 angular2-es6,但您的代码可以在没有任何问题的情况下运行该错误。 (见:https://github.com/blacksonic/angular2-es6-starter/issues/1) 该问题也有一些修复(与依赖项共舞以找到好的)。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2018-07-04
    • 1970-01-01
    • 1970-01-01
    • 2018-10-04
    • 2020-11-20
    • 2022-06-20
    • 2018-04-07
    • 1970-01-01
    相关资源
    最近更新 更多