Not working with Cloudflare workers - cannot be invoked without 'new'
himanshu-ntml opened this issue · 1 comments
himanshu-ntml commented
Describe the bug
I am trying to use tsyringe in hono app for dependency injection but i am getting below error. Let me know if you need any more info.
wrangler:inf] Ready on http://localhost:8787
✘ [ERROR] service core:user:app: Uncaught TypeError: Class constructor BookController cannot be invoked without 'new'
at null.<anonymous> (index.js:3844:23) in class_1
at null.<anonymous> (index.js:3791:18)
at null.<anonymous> (index.js:3798:6) in InternalDependencyContainer2.construct
at null.<anonymous> (index.js:3544:25) in InternalDependencyContainer2.resolve
at null.<anonymous> (index.js:3948:30)
✘ [ERROR] MiniflareCoreError [ERR_RUNTIME_FAILURE]: The Workers runtime failed to start. There is likely additional logging output above.
To Reproduce
https://github.com/himanshu-ntml/hono-tsyringe
Expected behavior
It should work fine with the wrangler dev
Version: 4.8.0
DDuran19 commented
I am having this issue as well. is there any fix for this?