Hyperledger Composer: "No version of composer-cli has been detected" after global installation

0 votes

i am getting following error when i run composer -v after installing composer-cli globally npm i -g composer-cli :-

/usr/local/lib/node_modules/composer-cli/node_modules/composer-common/lib/cardstore/businessnetworkcardstore.js:54
async get(cardName) {
      ^^^SyntaxError: Unexpected identifier
at createScript (vm.js:56:10)
at Object.runInThisContext (vm.js:97:10)
at Module._compile (module.js:542:28)
at Object.Module._extensions..js (module.js:579:10)
at Module.load (module.js:487:32)
at tryModuleLoad (module.js:446:12)
at Function.Module._load (module.js:438:3)
at Module.require (module.js:497:17)
at require (internal/module.js:20:19)
at Object.<anonymous> (/usr/local/lib/node_modules/composer-cli/node_modules/composer-common/index.js:56:43)

When i executed ./createPeerAdminCard.sh i get below error :-

Development only script for Hyperledger Fabric control
Running 'createPeerAdminCard.sh'
FABRIC_VERSION is set to 'hlfv11'
FABRIC_START_TIMEOUT is unset, assuming 15 (seconds)
No version of composer-cli has been detected, you need to installcomposer-cli at v0.19 or higher

Can anyone help me ?

Oct 31, 2018 in Blockchain by slayer
• 29,050 points
350 views

1 answer to this question.

0 votes
This seems like a version issue. Upgrade the version to v9.11.1 or later. It should solve the error.
answered Oct 31, 2018 by Omkar
• 67,380 points
Are you talking about composer-cli version or node version.

I am using composer-cli version  0.20

and node version v 9.4.x

Still this error is showing.
Could you post the error logs?

Related Questions In Blockchain

0 votes
1 answer

Why do the resultant hash after mining has a leading no. of zeroes in Blockchain verification?

This is chosen by the DIFFICULTY EQUATION. In ...READ MORE

answered Aug 10, 2018 in Blockchain by Christine
• 15,790 points
41 views
0 votes
1 answer
0 votes
1 answer
0 votes
1 answer
+1 vote
1 answer

I am unable to change port of composer-rest-server. Please help!

Use full format for running a business ...READ MORE

answered Mar 27, 2018 in Blockchain by Christine
• 15,790 points
277 views
+1 vote
1 answer
+1 vote
7 answers
0 votes
1 answer

Hyperledger Composer: not able to install Hyperledger composer-cli

Try setting the PATH like this, export PATH="/usr/local/share/npm/bin:$PATH" Now run the ...READ MORE

answered Oct 31, 2018 in Blockchain by Omkar
• 67,380 points
242 views