GPC
GPC

Reputation: 381

Hyperledger fabric 2.1 chaincode installation

I am trying to install a node chaincode in my peer using the latest chaincode lifecycle. But I am getting below error when I try to install the chaincode

 peer lifecycle chaincode install testcc.tar.gz

Error:

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 install --production
npm WARN deprecated [email protected]: Chokidar 2 will break on node v14+. Upgrade to chokidar 3 with 15x less dependencies.
npm WARN deprecated [email protected]: fsevents 1 will break on node v14+ and could be using insecure binaries. Upgrade to fsevents 2.
npm WARN deprecated [email protected]: https://github.com/lydell/resolve-url#deprecated
npm WARN deprecated [email protected]: Please see https://github.com/lydell/urix#deprecated
npm WARN deprecated [email protected]: use String.prototype.padStart()
npm WARN deprecated [email protected]: request has been deprecated, see https://github.com/request/request/issues/3142
npm ERR! code ENOENT
npm ERR! syscall spawn git
npm ERR! path git
npm ERR! errno ENOENT
npm ERR! enoent Error while executing:
npm ERR! enoent undefined ls-remote -h -t ssh://[email protected]/DABH/diagnostics.git
npm ERR! enoent 
npm ERR! enoent 
npm ERR! enoent spawn git ENOENT
npm ERR! enoent This is related to npm not being able to find a file.
npm ERR! enoent 

npm ERR! A complete log of this run can be found in:
npm ERR!     /root/.npm/_logs/2020-06-22T12_39_49_423Z-debug.log
"

Upvotes: 2

Views: 862

Answers (1)

Christoffer Olsson
Christoffer Olsson

Reputation: 46

Recent changes in chaincode seems to have introduced a bad depedency. There is an ongoing discussion in the Hyperledger Fabric Rocketchat where someone claims that they are patching it now.

A link to the discussion: https://chat.hyperledger.org/channel/fabric?msg=9FYkjy8SLyB6bBN2C

Update: Allegedly, this PR will fix the dependency issue: https://github.com/hyperledger/fabric-chaincode-node/pull/174/files

Update2: The Pr seems to have been merged. I managed to start a fresh Fabric network without touching any dependencies.

Upvotes: 3

Related Questions