Open dashart-ke opened 3 days ago
The issue comes directly from SWC and downgrading to version 1.7.26
or 1.7.28
works. We have updated all the starter kits to use version 1.7.26
by default.
However, for existing apps you can run the following command to pin the SWC version.
npm i -D @swc/core@1.7.26 --save-exact
Thanks a lot for confirmation and opening an issue at swc project!
Package version
"@swc/core": "1.7.35"
Describe the bug
Hi, as already reported by different users in discord general channel: @swc/core v1.7.35 will break dev server.
After upgrade to 1.7.35 from 1.7.28, decorators like @inject will lead to strange errors.
Sample controller code:
As soon as the controller will be loaded via method call, the dev server with HMR will crash with error.
console output
As soon as I remove "@inject()" from my controller, no crash occurs.
Workaround: Downgrade of @swc/core to 1.7.28.
Notice It is unclear if it is a bug of @swc/core nor adonisjs. I hope I selected the correct adonisjs repo.
Dev server started with
node ace serve --hmr
Error occurs without hmr tonode ace serve
package.json
Reproduction repo
No response