3

in https://docs.aws.amazon.com/managed-blockchain/latest/managementguide/managed-blockchain-hyperledger-develop-chaincode.html

it mentions

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.

I have a simple package.json that has the following structure

{
    "name": "test",
    "version": "0.0.1",
    "description": "node.js",
    "engines": {
        "node": ">=8.4.0",
        "npm": ">=5.3.0"
    },
    "scripts": {
        "start": "fabric-chaincode-node start"
    },
    "engine-strict": true,
    "license": "Apache-2.0",
    "dependencies": {
        "fabric-shim": "^1.4.5",
        "fabric-contract-api": "^1.4.5"
    }
}

Since there is no internet access to the peer I am unable to instantiate the chaincode because internally the chaincode runs npm install --production which fails. How do I bundle my CC and install it on the peer when the peer has no internet connection?

  • Hyperledger Fabric v2.2 (https://hyperledger-fabric.readthedocs.io/en/release-2.2/cc_launcher.html) now supports external chain code builder. You can use that to build your chaincode upfront. – ygnr Nov 30 '20 at 22:56
  • AWS managed blockchain uses v1.4 – Mahmoud Khraisha Dec 02 '20 at 18:45

0 Answers0