-
-
Notifications
You must be signed in to change notification settings - Fork 375
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CJS import issue with middy v4 when using node16/nodenext #1242
Comments
Have you tried downgrading to a lower version? I have 4.6 and it also occurs to me. I initially thought that v4 would still support cjs (albeit deprecated) but apparently this seems not to be the case |
if you use https://arethetypeswrong.github.io/ you'll see the v4 and v3 both have this issue the only one that will work is v2 but event that version has its own issues so this has been an ongoing issue since basically the beginning only v5 works properly but is only esm so doesnt work for us until we get require(esm) but thats still at least a few months away |
I think you can actually do that now? Thats is what I did. Try it and let me know of it works on your end. |
There is a new flag |
@willfarrell oh there's a flag? I am pretty sure I did not enable any flags on my end. weird.. |
Describe the bug
A clear and concise description of what the bug is.
We are using middy in a common js project so we tried installing
@middy/core
v4 but we are getting errors because it seems your types are incorrect.Checking on Are The Types Wrong? also confirms this.
It would be great if you could backport a fix to v4 so those of us using commonjs could still use this library without having to give up on module node16/nodenext
To Reproduce
How to reproduce the behaviour:
tsconfig.json
usesmodule: node16 or nodenext
as well asesModuleInterop: true
import middy from '@middy/core
Expected behaviour
As mentioned above it would be great if we could have a patch to v4 with fixed types
Environment (please complete the following information):
Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered: