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

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:

==> 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.

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

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.

2 Likes

Hi @andie

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

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.

1 Like

No luck… :confused:
Guess its time to move to GCP…