All,
After following the instructions in this page: Installing the Development Environment to install Hyperledger Composer, I encountered this error every time I use
sudo ./createPeerAdminCard.sh
I am sure that I have installed the correct version of composer-cli by executing these commands:
npm install -g composer-cli@next
or
npm install -g composer-cli@0.19.0
Can someone advice what to do?
FYI the correct Install Doc for v0.19.0 of Composer is here
It looks like you are using
sudo
for some of the commands which may well be causing the problems. You should not need to use root or sudo. There is additional information in the the knowledge wiki about installing.For anyone encountering this or related problems, note that the recommended Node version is currently 8.9.x only. See knowledge wiki.
My solution was:
nvm install 8.9.0
nvm use 8.9.0
npm install -g composer-cli
I had the same issues. And I solved it.
Follow the instructions in Installing pre-requisites.
Very Important the link is below(I am using MacOS) : - https://hyperledger.github.io/composer/latest/installing/installing-prereqs.html
After completing the above step destroy a previous setup
https://hyperledger.github.io/composer/latest/installing/development-tools.html#appendix
or
run the above command.
Uninstalling the CLI tools ( 4 commands ):
and installing them again
After that all, check
composer -v.
You will get the required version of a composer. And the continue with the steps mentioned in https://hyperledger.github.io/composer/latest/installing/development-tools.html
In my case, I had to set the path variable for npm.
Run the following command:
This will give your npm path.
It can give something like:
/usr/local/share/npm
Write the following command on your
.bashrc
or.bash_profile
file or simply run the command on your terminal:After that:
createPeerAdminCard.sh
Now, it should run fine without the '
composer-cli not found
' error.