-
-
Notifications
You must be signed in to change notification settings - Fork 133
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
Latest V15 "Cannot find module koa" #314
Comments
Same here:
|
@RemyMachado if you change your import statement to what I have in the OP and remove the external |
@TurtIeSocks Unfortunately, no. import GraphQLUpload from 'graphql-upload/GraphQLUpload' gives me: I'm so annoyed by this library's import style. |
@TurtIeSocks thanks for the thanks about this package, it's appreciated. Look in You need to do this (with the import GraphQLUpload from "graphql-upload/GraphQLUpload.js"; The readme documents what modules are publicly exported, what format they are in, what there file names are, and links to the Lines 39 to 46 in cd9e4f1
You can see more details about importing in this issue and comment: Hopefully with the correct imports the TypeScript error regarding |
hey there. got the same problem. i think it is because you are linking all type defs in the preocessRequest.js
but if you are not using koa... or vice versa express you will get the error. So i installed koa... but then i get:
|
so you need to add @types/koa to your dependencies as well. |
Thanks for finding the problem! Installing The intention was that you should not need the Koa types installed if you are using Express, and vica versa. That's why those types are optional peer dependencies: Lines 55 to 62 in cd9e4f1
|
PS: you are write typings are enough. i do not know how exactly the typings with js works, so i thought it really imports source to extract the typings from the package. But nice that there is no overhead recarding in the production build size because only typings are needed during build time. so i get this going for me :D |
The fix has been published in v15.0.1 🚀 |
Confirmed, thanks @jaydenseric! |
Would be great to add a section to the readme on how to import it in typescript, since this import style is not so common. I won't be able to create a PR in the next three weeks but after that I can do it if you want. Do you have a preferred place where to put it into the readme? |
…ule `processRequest.js`. Fixes jaydenseric/graphql-upload#314 .
I'm upgrading from V13, followed the guide that demonstrated how to update the import paths. (I would recommend linking the GH issue in the patch notes maybe?)
Info:
Using the following:
Receiving the error:
I see the following in
graphqlUploadKoa.js
, if it helps:Any recommendations?
Thanks for the package!
The text was updated successfully, but these errors were encountered: