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

+1 vote

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

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,300 points

2 answers to this question.

+1 vote
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
• 69,110 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?
+1 vote

I am also facing a similar issue, but in my case I already have composer-cli of v20.9

So, I am not sure what does this error means.Could you please help me out

Below is a screenshot that displays the error message !


answered Sep 20, 2019 by sam
• 160 points
One of the reasons for this error could be because you are running one or more commands as sudo. Is that the case? You shouldn't run any commands as sudo

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,830 points
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,830 points
+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
• 69,110 points