# Node deploy fails with a error "read/write on closed pipe"

**URL:** <https://community.fly.io/t/node-deploy-fails-with-a-error-read-write-on-closed-pipe/12853>\
**Category:** Build debugging\
**Created:** [May 12, 2023, 9:30am UTC](https://community.fly.io/t/node-deploy-fails-with-a-error-read-write-on-closed-pipe/12853 "2023-05-12T09:30:58Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![indra83](https://sea1.discourse-cdn.com/fly1/user_avatar/community.fly.io/indra83/32/12215_2.png) [@indra83](https://community.fly.io/u/indra83)\
**Post date:** [May 12, 2023, 9:30am UTC](https://community.fly.io/t/node-deploy-fails-with-a-error-read-write-on-closed-pipe/12853/1 "2023-05-12T09:30:58Z")

</div>

Hi, I’ve been working on a Node project for 3+ months and the app deployed without issues. Since morning I’ve been having issue deploying. Here is the output:

```auto
==> Verifying app config
--> Verified app config
==> Building image
Remote builder fly-builder-silent-lake-4504 ready
==> Creating build context
--> Creating build context done
==> Building image with Docker
--> docker host: 20.10.12 linux x86_64
[+] Building 148.6s (0/1)
[+] Building 230.4s (0/1)
[+] Building 461.0s (0/1)
[+] Building 573.4s (0/1)
[+] Building 804.5s (0/1)
 => [internal] load remote build context 804.5s
ERRO[0814] Can't add file /home/indra/work/shopify/tradyl/tradyl-dropship/node_modules/@oclif/color/package.json to tar: io: read/write on closed pipe[+] Building 815.7s (1/1) FINISHED
 => ERROR [internal] load remote build context 815.7s
------
 > [internal] load remote build context:
------
Error failed to fetch an image or build from source: error building: error during connect: Post "http://[fdaa:1:14ec:a7b:f0f:de0:69f4:2]:2375/v1.41/build?buildargs=null&buildid=upload-request%3Ad4b06f375d8c5a3916185f1b66c226a56e9dd78af6530ffa32176145e935f689&cachefrom=null&cgroupparent=&cpuperiod=0&cpuquota=0&cpusetcpus=&cpusetmems=&cpushares=0&dockerfile=&labels=null&memory=0&memswap=0&networkmode=&rm=0&shmsize=0&target=&ulimits=null&version=2": write unix @->/home/indra/.fly/fly-agent.sock: write: broken pipe

```

My `.dockerignore` has `node_modules` folders added and the project only has a few config changes since last successful deploy.

---

<div class="post-metadata">

**Author:** ![andie](https://sea1.discourse-cdn.com/fly1/user_avatar/community.fly.io/andie/32/11768_2.png) [@andie](https://community.fly.io/u/andie)\
**Post date:** [May 12, 2023, 1:14pm UTC](https://community.fly.io/t/node-deploy-fails-with-a-error-read-write-on-closed-pipe/12853/2 "2023-05-12T13:14:47Z")

</div>

Hi @indra83

There could be an issue with your remote builder app.

You can try deleting the remote builder, either from the dashboard or by running

```auto
fly apps destroy <your-fly-builder-name>

```

Then try to deploy again.

It’s also always a good idea to make sure flyctl is up-to-date.

---

<div class="post-metadata">

**Author:** ![indra83](https://sea1.discourse-cdn.com/fly1/user_avatar/community.fly.io/indra83/32/12215_2.png) [@indra83](https://community.fly.io/u/indra83)\
**Post date:** [May 12, 2023, 5:10pm UTC](https://community.fly.io/t/node-deploy-fails-with-a-error-read-write-on-closed-pipe/12853/3 "2023-05-12T17:10:30Z")

</div>

Hi @andie

I’ve tried both suggestions but the issue persists - deleted the remote builder and updated flyctl (it was indeed out of date).

---

<div class="post-metadata">

**Author:** ![rubys](https://sea1.discourse-cdn.com/fly1/user_avatar/community.fly.io/rubys/32/16907_2.png) [@rubys](https://community.fly.io/u/rubys)\
**Post date:** [May 12, 2023, 6:22pm UTC](https://community.fly.io/t/node-deploy-fails-with-a-error-read-write-on-closed-pipe/12853/4 "2023-05-12T18:22:13Z")

</div>

> [@indra83](#):
>
> My `.dockerignore` has `node_modules` folders added

Seeing `804.5s` (wow!) and `ERRO[0814] Can't add file .../node_modules/...` suggests that there may be a problem with your `.dockerignore` can you double check the `node_module` line in that file. `/node_modules` is also fine.

---

<div class="post-metadata">

**Author:** ![indra83](https://sea1.discourse-cdn.com/fly1/user_avatar/community.fly.io/indra83/32/12215_2.png) [@indra83](https://community.fly.io/u/indra83)\
**Post date:** [May 14, 2023, 11:45am UTC](https://community.fly.io/t/node-deploy-fails-with-a-error-read-write-on-closed-pipe/12853/5 "2023-05-14T11:45:32Z")

</div>

No luck… 😕  
Guess its time to move to GCP…
