Search code examples
node.jshyperledger-fabrichyperledgerhyperledger-composer

Cannot install Hyperledger composer-cli


I'm starting to build an app on Hyperledger Composer following these instructions, however when I run:

$ ./createPeerAdminCard.sh

I get this :

"Development only script for Hyperledger Fabric control

Running 'createPeerAdminCard.sh'

FABRIC_VERSION is unset, assuming hlfv11

FABRIC_START_TIMEOUT is unset, assuming 15 (seconds)

No version of composer-cli has been detected, you need to install composer-cli at v0.19 or higher."

However, I have already installed it using:

$ npm install -g composer-cli

And I have got:

+ composer-cli@0.19.2 added 568 packages from 473 contributors in 58.747s

Please help me !


Solution

  • nvm should be managing your path for you so you don't have to worry about this. It would be worth checking first that you have installed node using nvm and which version is currently active

    nvm ls will display versions of node installed

    nvm current will display the currently active version

    If it still doesn't work then you need to check your PATH to see if the correct path is present and add it manually if not. In your case the correct path would be /home/arnaud/.nvm/versions/node/v8.11.1/bin You should also check that the version of node you are using is definitely the one installed via nvm.