-
-
Notifications
You must be signed in to change notification settings - Fork 428
Open
Labels
bugSomething isn't workingSomething isn't workingreviewWaiting for issue reporter approvalWaiting for issue reporter approval
Description
What version of Elysia is running?
latest
What platform is your computer?
Linux 5.15.167.4-microsoft-standard-WSL2 x86_64 x86_64
What steps can reproduce the bug?
Create an Elysia project with "type": "module" in the package.json
Elysia modules are imported as CJS, so then when you use a package like TypeBox which doesn't suffer from the dual package hazard, it will import the ESM versions of the code which are incompatible with Elysia exported TypeBox modules.
The workaround for now is to patch TypeBox so that it only exports CJS which isn't preferable, but has to be done to use TypeBox alongside Elysia in an ESM based project.
What is the expected behavior?
If the project using Elysia has a "type": "module" specified, it should use ESM code from Elysia, which would mean that TypeBox can be used as expected.
What do you see instead?
No response
Additional information
No response
Have you try removing the node_modules and bun.lockb and try again yet?
No response
jasperdunn, LufyCZ and quentindutot
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workingreviewWaiting for issue reporter approvalWaiting for issue reporter approval