1

I am new to blockchain and we are using hyperledger fabric to run it. The project instructions read:

  1. npm i //to install dependencies
  2. npm run env:restart //Create a new development blockchain network - From the root of your project
  3. npm run cc:start -- supplychain //Install your smart contract followed by command(s) to create a record in the ledger.

The first two steps are running, i.e. my network is getting set up successfully.

Step no. 3 is failing with the following error.

I have installed hurl as well. Have previously tried clearing cache as well but that did not ease things for me either.

Please help, I don't understand this error and which are the defining lines/aspects of it (might help to search). I have tried bits and parts separately but at this point an overall understanding would go a long way to help.

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: 127 "/bin/sh: npm: not found
"
[hurley] - Found error while running script!
(node:22518) UnhandledPromiseRejectionWarning: Error: Errors found in script, stopping execution
    at Object.<anonymous> (/home/avantika/Documents/major-blockchain/pharma-chain/node_modules/@worldsibu/hurley/dist/utils/sysWrapper.js:116:27)
    at step (/home/avantika/Documents/major-blockchain/pharma-chain/node_modules/tslib/tslib.js:139:27)
    at Object.next (/home/avantika/Documents/major-blockchain/pharma-chain/node_modules/tslib/tslib.js:120:57)
    at /home/avantika/Documents/major-blockchain/pharma-chain/node_modules/tslib/tslib.js:113:75
    at new Promise (<anonymous>)
    at Object.__awaiter (/home/avantika/Documents/major-blockchain/pharma-chain/node_modules/tslib/tslib.js:109:16)
    at Object.execContent (/home/avantika/Documents/major-blockchain/pharma-chain/node_modules/@worldsibu/hurley/dist/utils/sysWrapper.js:112:24)
    at InstallChaincodeShGenerator.BaseGenerator.run (/home/avantika/Documents/major-blockchain/pharma-chain/node_modules/@worldsibu/hurley/dist/generators/base.js:18:40)
    at ChaincodeGenerator.install (/home/avantika/Documents/major-blockchain/pharma-chain/node_modules/@worldsibu/hurley/dist/generators/chaincodegenerator.js:59:35)
    at ChaincodeCLI.<anonymous> (/home/avantika/Documents/major-blockchain/pharma-chain/node_modules/@worldsibu/hurley/dist/cli.js:351:55)
(node:22518) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 2)
(node:22518) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
Paolo
  • 20,112
  • 21
  • 72
  • 113

0 Answers0