解决: 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

原文地址:https://www.cnblogs.com/saving/p/8943893.html