You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
The text was updated successfully, but these errors were encountered:
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
andbun.lockb
and try again yet?No response
The text was updated successfully, but these errors were encountered: