![](/img/trans.png)
[英]How to delete a Firebase Storage folder from a Firebase Cloud Function?
[英]Error downloading from firebase Storage in a Cloud Function
我有以下代码从Firebase存储下载.txt文件:
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});
但它抛出错误:
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)
我以前使用此方法没有问题,不确定我做错了什么,因为我没有尝试建立流。 任何帮助表示赞赏,谢谢。
正如@ bob2所提到的,这是一个已知的错误 。
该错误中建议的解决方法是:
如果您rm -rf node_modules package-lock.json,然后再次安装npm,则一切都应按预期工作。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.