解决: Class constructor Entity cannot be invoked without 'new'

用webpack搞前端。

 

出现 Class constructor Entity cannot be invoked without 'new'。

应该是babel转化的时候出问题了。

 

修改.babelrc文件

改为:

{
  "presets": [
    ["env", { "modules": false ,"targets":{"node":"current"}}],
    "stage-3"
  ]
}

  即可成功运行。

参考:https://github.com/sequelize/sequelize/issues/7840

 

posted @ 2018-04-25 13:14  狂乱贵公子  阅读(4650)  评论(0编辑  收藏  举报