midwayjs / midway

🍔 A Node.js Serverless Framework for front-end/full-stack developers. Build the application for next decade. Works on AWS, Alibaba Cloud, Tencent Cloud and traditional VM/Container. Super easy integrate with React and Vue. 🌈

Home Page:https://www.midwayjs.org/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

原有项目由cjs改为esm后typeorm的entity里相互关联实体会报错

ndpay opened this issue · comments

  • Node Version: 18
  • Midway Version(Decorator/Core): 3.12.0
  • Component Name/Version:
  • Platform: Mac系统
  • Mini Showcase Repository:

编译watch的时候报错如下:

file:///Users/develop/www/web/dzpp/dzpp_server/dist/modules/hotel/entity/hotel.images.js:38
__metadata("design:type", HotelEntity)
^

ReferenceError: Cannot access 'HotelEntity' before initialization
at file:///Users/develop/www/web/dzpp/dzpp_server/dist/modules/hotel/entity/hotel.images.js:38:31
at ModuleJob.run (node:internal/modules/esm/module_job:194:25)

在cjs没有报错!