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

Help needed with CLI dataset export error and duplicating datasets

2 replies
Last updated: May 13, 2020
Hi guys, just checked out the updated plugins page after being away for several months - looking really exciting! Wish you all the best with sanity I really dig what you guys are doing.
I need help with the cli dataset export error I'm having below. The export command errors out after completing and due to the error the archive is unextractable.

I also want to ask how one would go about duplicating a dataset. When I export the production dataset, I'm getting an assets folder, an assets json and the ndjson. I can import the ndjson with the cli import command, but I couldn't find info on how one would go about importing assets.

Many thanks!


✔ Exporting documents... (204/204)
⠧ Downloading assets... (29/590)(node:12634) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 timeout listeners added. Use emitter.setMaxListeners() to increase limit
⠹ Downloading assets... (36/590)(node:12634) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 timeout listeners added. Use emitter.setMaxListeners() to increase limit
⠹ Downloading assets... (48/590)(node:12634) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 timeout listeners added. Use emitter.setMaxListeners() to increase limit
⠇ Downloading assets... (72/590)(node:12634) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 timeout listeners added. Use emitter.setMaxListeners() to increase limit
⠙ Downloading assets... (94/590)(node:12634) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 timeout listeners added. Use emitter.setMaxListeners() to increase limit
⠼ Downloading assets... (111/590)(node:12634) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 timeout listeners added. Use emitter.setMaxListeners() to increase limit
⠧ Downloading assets... (116/590)(node:12634) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 timeout listeners added. Use emitter.setMaxListeners() to increase limit
⠼ Downloading assets... (208/590)(node:12634) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 timeout listeners added. Use emitter.setMaxListeners() to increase limit
✔ Downloading assets... (590/590)
Adding assets to archive...events.js:174
      throw er; // Unhandled 'error' event
      ^

Error: Read timeout: No data received on socket for 180000 ms
    at TLSSocket.response.connection.setTimeout (/home/deniz/dev/enteria/sanity/node_modules/@sanity/export/lib/requestStream.js:76:32)
    at Object.onceWrapper (events.js:277:13)
    at TLSSocket.emit (events.js:194:15)
    at TLSSocket.Socket._onTimeout (net.js:440:8)
    at ontimeout (timers.js:436:11)
    at tryOnTimeout (timers.js:300:5)
    at listOnTimeout (timers.js:263:5)
    at Timer.processTimers (timers.js:223:10)
Emitted 'error' event at:
    at emitErrorNT (internal/streams/destroy.js:82:8)
    at process._tickCallback (internal/process/next_tick.js:63:19)
May 12, 2020, 10:41 PM
I changed my node version from 10.15.3 to 12.13.0 (as suggested on an earlier thread) and the export worked.
And the question regarding the import I was able to resolve via sanity dataset import --help.

Thanks!
May 13, 2020, 7:17 AM
Great that you got it working!
May 13, 2020, 7:39 AM

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?