I am trying to create an IBM Cloud Functions blockchain node.js action that uses a Hyperledger Fabric node SDK package, but I'm having trouble requiring the fabric-network package in the action.
Since it is a 3rd party package, it seems I need to upload the action as a zipped file, but when I do that, I see:
"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"
I want to create a javascript action like the following:
'use strict'
const { X509WalletMixin, Gateway } = require('fabric-network')
async function main(params) {
return { message: 'success' }
}
What is the correct way to handle 3rd party packages like this?