Closed nekmart closed 1 year ago
In the readme exports section:
https://github.com/jaydenseric/graphql-upload#exports
You can see the module is documented as GraphQLUpload.mjs
.
If you just look at the modules that are published:
https://unpkg.com/browse/graphql-upload@16.0.1/
You can see the module really is called GraphQLUpload.mjs
.
So why are you attempting this, with .js
instead of the correct .mjs
?
import GraphQLUpload from "graphql-upload/GraphQLUpload.js";
Even if you were importing correctly, it seems Nest.js doesn't support importing standard JavaScript modules anyway so you will probably run into that soon, see https://github.com/jaydenseric/graphql-upload/issues/332#issuecomment-1223003793 . If you do run into that issue, please raise it with Nest.js not here.
Hello, I am building a nestjs project with typescript and graphql. I want to use graphql-upload in my project.
I install two package-
graphql-upload
@types/graphql-upload
After installing this packages. I import it-
import { GraphQLUpload, FileUpload } from "graphql-upload";
And my Mutation-
Here I am getting this error-
I see this issue alreay- https://github.com/jaydenseric/graphql-upload/issues/305
From this issue I am trying to use-
import GraphQLUpload from "graphql-upload/GraphQLUpload.js";
But here I am getting typescript type declaration error like this image-
How can I solve this issue.