Welcome to the Linux Foundation Forum!

I am facing issue while installing simple chain code in hyperledger fabric 2.2.

Options

~/go/src/github.com/hyperledger/fabric-samples/test-network$ peer lifecycle chaincode install simple_chaincode.tar.gz

Error: chaincode install failed with status: 500 - failed to invoke backing implementation of 'InstallChaincode': could not build chaincode: docker build failed: docker image build failed: docker build failed: Error returned from build: 1 "+ INPUT_DIR=/chaincode/input

  • OUTPUT_DIR=/chaincode/output
  • cp -R /chaincode/input/src/. /chaincode/output
  • cd /chaincode/output
  • '[' -f package-lock.json -o -f npm-shrinkwrap.json ]
  • npm ci '--only=production'
    npm ERR! code E404
    npm ERR! 404 Not Found - GET https://registry.npmjs.org/colors/-/colors-1.4.1.tgz
    npm ERR! 404
    npm ERR! 404 'colors@1.4.1' is not in the npm registry.
    npm ERR! 404 You should bug the author to publish it (or use the name yourself!)
    npm ERR! 404
    npm ERR! 404 Note that you can also install from a
    npm ERR! 404 tarball, folder, http url, or git url.

npm ERR! A complete log of this run can be found in:
npm ERR! /root/.npm/_logs/2022-01-22T10_37_30_201Z-debug.log

I am trying to install a simple chaincode but facing this error.

Answers

  • Bobbijn
    Bobbijn Posts: 190
    Options

    @kuldeep.narvekar,

    Hello Let's see if we can get to the bottom of this issue. Assuming you installed the dependencies correctly in Lab 2.1: Development Environment Setup please check to make sure that the docker-compose version is 1.14.0 or greater by running the following command, # docker-compose --version .
    Did you have any issues creating the chaincode package in the previous step in Lab 4.1: Step-by-Step SimpleChaincode Lifecycle Management? Bobbi

  • kuldeep.narvekar
    kuldeep.narvekar Posts: 10
    edited January 2022
    Options

    @Bobbijn My docker-compose version is 1.25.0 and I was able to create chaincode package without any issues.

  • Bobbijn
    Bobbijn Posts: 190
    edited January 2022
    Options

    Hello, next please check the syntax of the commands as it is important to execute them exactly .

  • kuldeep.narvekar
    Options

    @Bobbijn Yeah I did it 4, 5 times repeatedly but still the same issue.

  • teran92
    Options

    Hello @kuldeep.narvekar do you solve this issue? I have running in the same error.
    Thanks in advance

  • Bobbijn
    Bobbijn Posts: 190
    Options

    @teran92, Hello, I am understanding you are running into the same issue that @kuldeep.narvekar was having an issue with. Let's see if we can get to the bottom of this. An error of this type occurs with the Docker dependencies. Here are some additional resources for you that might help determine your issue. Please keep us posted as to your progress. Bobbi

    https://lists.hyperledger.org/g/fabric
    https://wiki.hyperledger.org/display/fabric
    https://discord.gg/hyperledger

Categories

Upcoming Training