我正在尝试创建一个使用 Hyperledger Fabric 节点 SDK 包的 IBM Cloud Functions 区块链 node.js 操作,但在操作中需要 fabric-network 包时遇到了问题。
由于它是第 3 方包,看来我需要将操作作为压缩文件上传,但是当我这样做时,我看到:
"error": "Initialization has failed due to: Error: Failed to load gRPC binary module because it was not installed for the current system\nExpected directory: node-v57-linux-x64-glibc\nFound: [node-v57-darwin-x64-unknown]\nThis problem can often be fixed by running \"npm rebuild\" on the current system"
我想创建一个 javascript 操作,如下所示:
'use strict'
const { X509WalletMixin, Gateway } = require('fabric-network')
async function main(params) {
return { message: 'success' }
}
处理这样的 3rd 方包的正确方法是什么?