Building a JavaScript application using Create React App (yarn build) fails in ~80% of the time with the following error:
Error: write EPIPE
at WriteWrap.afterWrite [as oncomplete] (net.js:844:14)
Emitted 'error' event at:
at onwriteError (_stream_writable.js:431:12)
at onwrite (_stream_writable.js:453:5)
at _destroy (internal/streams/destroy.js:39:7)
at Socket._destroy (net.js:548:3)
at Socket.destroy (internal/streams/destroy.js:32:8)
at WriteWrap.afterWrite [as oncomplete] (net.js:846:10)
In other cases the same commit triggers this error:
/home/circleci/project/node_modules/thread-loader/dist/WorkerPool.js:393
throw _iteratorError2;
^
Error: This socket has been ended by the other party
at Socket.writeAfterFIN [as write] (net.js:356:12)
at PoolWorker.writeEnd (/home/circleci/project/node_modules/thread-loader/dist/WorkerPool.js:93:22)
at PoolWorker.dispose (/home/circleci/project/node_modules/thread-loader/dist/WorkerPool.js:264:12)
at WorkerPool.disposeWorkers (/home/circleci/project/node_modules/thread-loader/dist/WorkerPool.js:381:20)
at Timeout._onTimeout (/home/circleci/project/node_modules/thread-loader/dist/WorkerPool.js:365:25)
at ontimeout (timers.js:466:11)
at tryOnTimeout (timers.js:304:5)
at Timer.listOnTimeout (timers.js:267:5)
Emitted 'error' event at:
at Socket.writeAfterFIN [as write] (net.js:359:8)
at PoolWorker.writeEnd (/home/circleci/project/node_modules/thread-loader/dist/WorkerPool.js:93:22)
[... lines matching original stack trace ...]
at Timer.listOnTimeout (timers.js:267:5)
I’m unable to reproduce the same issue in a local environment.