-
Notifications
You must be signed in to change notification settings - Fork 759
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
Error: write EPIPE on large files - Next.js + Jest + Supertest #824
Comments
We have a pretty vanilla express.js app (a REST API) that uses supertest with mocha for testing. We recently upgraded it from Node.js 14.15.5 to the latest Node.js 18.x release (18.18.2) and all of a sudden the tests which upload files via the
After much Googling I stumbled on this issue. The files we're uploading in our tests were images 100K in size, so I tried replacing them with a 1x1 pixel JPEG that is only 3K in size, but the error still occurred, so despite what the OP suggests, I'm not convinced this has anything to do with file size of the attachment. The only thing that we changed was the Node.js version, and we kept all other dependency versions the same, so clearly something in Node.js was breaking this. Given that, I started downgrading Node.js from 18.18.2 to find where it starts breaking, and it starts breaking in Node.js 18.13.0 Here are the release notes for Node.js 18.13.0: |
@bploetz have you found a solution to this issue? |
@ajfranzoia nope :( |
Describe the bug
Node.js version: v18.14.2
OS version: macOS 13.4
Description: With Next.js + Jest + Supertest, when attaching a 10mb file to my post request I'm getting the error "write EPIPE"
Actual behavior
Test fails with the error "write EPIPE"
Expected behavior
Test should succeed with no error
Code to reproduce
https://github.com/dasveloper/next-test-supertest
Checklist
The text was updated successfully, but these errors were encountered: