-
Notifications
You must be signed in to change notification settings - Fork 2k
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
A problem with the use of koa and typescript #1393
Comments
Does that mean you don't see the error if you set |
If to set "esModuleInterop": true that all works. But I spent half a day search for an error. Thanks for responding. |
Yeah, that's still surprising to me, because I don't understand how |
What additional information can I give you? |
Hi guys, I've stumbled upon the very same issue and did some research. It turns out that the Long story short, since Koa is a commonjs module with |
Also, as a workaround until this is resolved in apollo-server packages, you can use type assertion. It's not even close to nice, but it does the job: graphqlServer.applyMiddleware({ app: app as any }); |
Hm, seems to be still erroring out even though the change on apollo-server side was added to re-enable compatibility for esModuleInterop. #1699 |
Relates-to or duplicated-by #1977, #2519, #2521 (and more). Thanks so much for opening this originally. While enabling |
Hi, I have a problem using koa and typescript if set
"esModuleInterop": true
in tsconfig.jsonMy code and error:
My code:
My dependencies:
The text was updated successfully, but these errors were encountered: