0

I've been developing a HyperLedger Fabric (v2.2.x) Chaincode in Typescript with de IBM Blockchain extension in VSCode. Locally the chaincode works well but I need to deploy it using the AWS Managed Blockchain.

Bounday 1. The AWS docummentation says:

Dependencies on other versions of fabric-shim or other library packages require that you bundle them with your chaincode because peer nodes do not have internet access to the NPM repository.

Managed Blockchain doesn't currently include fabric-shim for Hyperledger Fabric 2.2. You need to bundle this version of the library in your Node.js application.

Boundary 2. The command required to package de chaincode (peer lifecycle chaincode package) says:

The peer lifecycle chaincode package explicitly excludes the node_modules directory.

So, basically when I run npm i and tsc the project is built with no problem and I can run a node dist/index.js but it fails when the node_modules is missing because of the dependencies.

Any workaround about include the node_modules "indirectly" or package or bundle the dependencies?

Thanks!

  • 1
    Does this answer your question? [How Can I bundle a simple node.js application](https://stackoverflow.com/questions/71133139/how-can-i-bundle-a-simple-node-js-application) – david_k Sep 04 '22 at 07:06

0 Answers0