Unlock seamless workflows and faster delivery with our latest releases - Join the deep dive

Exporting assets in Sanity CLI fails with ECONNRESET error

7 replies
Last updated: Jun 9, 2023
Hi, I'm running
sanity dataset export
but I'm constantly getting
ECONNRESET
when downloading assets today.
I have run that command successfully in the past.

Any ideas?


āœ” Exporting documents... (15285/15285)
ā ‹ Downloading assets... (1561/2913)Error: aborted
    at connResetException (node:internal/errors:705:14)
    at TLSSocket.socketCloseListener (node:_http_client:454:19)
    at TLSSocket.emit (node:events:525:35)
    at node:net:301:12
    at TCP.done (node:_tls_wrap:588:7) {
  code: 'ECONNRESET'
}
Jun 9, 2023, 5:07 PM
About how long does the export run before this happens?
Jun 9, 2023, 7:27 PM
Around 30-45 minutes I'd say
Jun 9, 2023, 7:41 PM
What version of the CLI are you running?
Jun 9, 2023, 7:45 PM
Also to speed up the process, it may help to play around with the
--asset-concurrency <num>
flag when you run the command.
Jun 9, 2023, 7:47 PM
I was on
3.9.0
and node 16. I upgraded to
3.12.0
and node 18. It's working now, I'm not sure if it's a coincidence or not but I'll take it! šŸ˜„
Jun 9, 2023, 8:23 PM
And thanks for the tip on concurrency, I'll try that
Jun 9, 2023, 8:24 PM
Glad it started working
Jun 9, 2023, 8:29 PM

Sanityā€“ build remarkable experiences at scale

Sanity is a modern headless CMS that treats content as data to power your digital business. Free to get started, and pay-as-you-go on all plans.

Was this answer helpful?