I am trying to run fabcar sample using javascript chaincode,it fails with the following error while instantiating the chaincode
error: could not assemble transaction, err proposal response was not successful, error code 500, msg error starting container: error starting container: Failed to generate platform-specific docker build: Error returned from build: 1 "npm ERR! code EAI_AGAIN
npm ERR! errno EAI_AGAIN
npm ERR! request to https://registry.npmjs.org/fabric-shim failed, reason: getaddrinfo EAI_AGAIN registry.npmjs.org:443
please help me regarding this... It is happenning for all fabric samples whenever i try to run in javascript/typescript thanks in advance
When you instantiate a Javascript Smart Contract the Fabric creates a chaincode container and installs your Javascript contract (or sample) AND all the npm dependencies. This means that an npm registry with those modules must be accessible.
I suspect that you are behind a corporate proxy/firewall, or working in a region where there is no direct access to npm. On your host machine you probably have a .npmrc file which helps with the proxy, and you need to replicate that for the chaincode.
I think you need to place the .npmrc file in the root folder of your Smart Contract project - i.e. in the same folder as the package.json file.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With