write EPIPE error in when doing production build in docker
See original GitHub issueHi there, I’ve got FE in docker container and running build there ends with following error from time to time. Anyone got idea what’s causing it?
syscall: 'write'
code: 'EPIPE',
errno: 'EPIPE',
at processTicksAndRejections (internal/process/task_queues.js:79:11) {
at internal/child_process.js:810:39
Emitted 'error' event on ChildProcess instance at:
at /frontend/node_modules/terser-webpack-plugin/dist/TaskRunner.js:113:86
at enqueue (/frontend/node_modules/terser-webpack-plugin/dist/TaskRunner.js:89:35)
at TaskRunner.runTask (/frontend/node_modules/terser-webpack-plugin/dist/TaskRunner.js:41:26)
at JestWorker._callFunctionWithArgs (/frontend/node_modules/terser-webpack-plugin/node_modules/jest-worker/build/index.js:178:23)
at Farm.doWork (/frontend/node_modules/terser-webpack-plugin/node_modules/jest-worker/build/Farm.js:56:12)
at new Promise ()
at /frontend/node_modules/terser-webpack-plugin/node_modules/jest-worker/build/Farm.js:90:14
at Farm._push (/frontend/node_modules/terser-webpack-plugin/node_modules/jest-worker/build/Farm.js:159:12)
at Farm._enqueue (/frontend/node_modules/terser-webpack-plugin/node_modules/jest-worker/build/Farm.js:152:10)
at Farm._process (/frontend/node_modules/terser-webpack-plugin/node_modules/jest-worker/build/Farm.js:129:10)
at WorkerPool.send (/frontend/node_modules/terser-webpack-plugin/node_modules/jest-worker/build/WorkerPool.js:32:34)
at ChildProcessWorker.send (/frontend/node_modules/terser-webpack-plugin/node_modules/jest-worker/build/workers/ChildProcessWorker.js:330:17)
at ChildProcess.target.send (internal/child_process.js:677:19)
at ChildProcess.target._send (internal/child_process.js:806:20)
Error: write EPIPE
^
throw er; // Unhandled 'error' event
Issue Analytics
- State:
- Created 3 years ago
- Comments:11
Top Results From Across the Web
80% of the time build fails with Error: write EPIPE error
Hi, I keep getting this error when using v4.0.0: Module build failed: Error: write EPIPE at _errnoException (util.js:1031:13) at WriteWrap.
Read more >Docker Node.js EPIPE error - remarkablemark
I discovered this was caused by not allocating enough Memory and Swap in Docker Desktop > Settings > Resources > Advanced. Once I...
Read more >Webpack Build Fails with EPIPE error (Linux Subsystem only)
I have a project that compiles just fine if I run Webpack from command line using the windows version of the installed ...
Read more >UNHANDLED EXCEPTION write EPIP with Gatsby build
The site builds without errors locally, but when I try to deploy to netlify, it fails with an error msg. “error UNHANDLED EXCEPTION...
Read more >Build your Node image - Docker Documentation
Learn how to build your first Docker image by writing a Dockerfile. ... first thing you do once you've downloaded a project written...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I ran into a very simular problem where
yarn build
worked just fine on my local machine, but when running the same command inside adocker build .
command, i received EPIPE errors simular to above. My issue was relatively easy to solve by creating a.dockerignore
file to prevent copying of thenode_modules
on the local machine onto the docker image, like so:Hope this helps someone else.
may be an issue with memory. Add a memory constraint to node, e.g.
--max-old-space-size=1024
. The flag can be added a number of ways, i.e..npmrc
,NODE_OPTIONS
env variable, etc