问题标签 [persistent-object-store]

For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.

0 投票
1 回答
45 浏览

node.js - 使用 IBM Cloud Function 读取 gzip 文件 (.gz) 时出现问题(操作:Node.js 12)

我可以使用下面提到的代码(节点 --version:v14.15.0)读取本地机器上的data.json.gz文件。但是当我尝试在 IBM Cloud 中使用相同的操作(Node.js 12)从对象存储桶中读取相同的文件时,我收到以下错误 [ “stderr: ERROR: undefined - input_buf.on is not a功能” ]。

我对 NodeJS 很陌生;有人可以帮助确定这里的问题吗?我非常感谢您的支持。

在本地机器上工作的代码(Windows 10):

不适用于 IBM Cloud Function and Object Store Bucket 的代码: