-
-
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
createReadStream is not a function #256
Comments
I think you need to setup the https://github.com/jaydenseric/graphql-upload#class-graphqlupload |
Now I am getting this error apollographql/apollo-server#3508 It seems that I have to move back to Node v12 from v14 But is there any way to upload files without going back. I like the schema-first GraphQL but yours is code-first GraphQL so is there a way to do it with schema-first |
You are right it works now thank you very much |
In new version, same problem here. Any solutions? Error: **TypeError: createReadStream is not a function** Code: @Mutation((_) => Boolean)
addProfilePicture(
@Arg("picture", () => GraphQLUpload)
{ createReadStream, filename }: FileUpload
): Promise<boolean> {
return new Promise(async (resolve, reject) =>
createReadStream()
.pipe(createWriteStream(__dirname + `./${filename}`))
.on("finish", () => resolve(true))
.on("error", () => reject(false))
);
} |
I find solution when use Fastify/TypeGraphQL |
@jdgabriel @jaydenseric |
Hello
I made a project for a few months ago and everything was working even the upload images but when I started the project again after a while and tried to upload a single image I get this error "createReadStream is not a function"
Is the error there becuase that I updated from Node v12 to v14?
The text was updated successfully, but these errors were encountered: