用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

 

相关文章:

  • 2022-02-20
  • 2022-12-23
  • 2021-08-07
  • 2022-01-19
  • 2021-12-07
  • 2023-03-19
  • 2021-12-18
  • 2021-05-26
猜你喜欢
  • 2022-12-23
  • 2021-10-03
  • 2022-12-23
  • 2021-08-18
  • 2022-12-23
  • 2022-12-23
  • 2021-05-29
相关资源
相似解决方案