Reputation: 25
I have the following code to download a .txt file from a firebase storage:
const objectName = `${isla}/${localidad}/${zona}/map.txt`;
const file = storage.bucket(config["storageBucket"]).file(objectName);
const tmpFilePath = path.join(os.tmpdir(), "map.txt");
await file.download({destination: tmpFilePath});
but it throws the error:
Error: _read() is not implemented at Duplex.Readable._read
(_stream_readable.js:551:22) at Duplex.Readable.read
(_stream_readable.js:442:10) at resume_ (_stream_readable.js:822:12) at
_combinedTickCallback (internal/process/next_tick.js:139:11) at
process._tickDomainCallback (internal/process/next_tick.js:219:9)
I've used this method before with no problems, not sure what I've done wrong as I'm not trying to set up a stream. Any help is appreciated, thanks.
Upvotes: 1
Views: 84