I have successfully connecting 2 machine with Hyperledger composer. Somehow in the middle, the couched crashed. So somehow I want to restart my Hyperledger from the start.
When I tried to create admin card, No version of composer-cli has been detected, you need to install composer-cli at v0.19 or higher
So I did a little bit search at stack overflow and found some good information. Then I tried to uninstall composer-cli and reinstall it.
when I tried to uninstall it, ENOENT: no such file or directory, open '/home/ptech_root/package.json'
.
I don't know why this happens.
when I tried to install npm install -g composer-cli@0.20
, I get this.
/home/ptech_root/.nvm/versions/node/v8.15.0/bin/composer -> /home/ptech_root/.nvm/versions/node/v8.15.0/lib/node_modules/composer-cli/cli.js
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.7 (node_modules/composer-cli/node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.7: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
+ composer-cli@0.20.7
updated 1 package in 9.083s
but seems like I cannot uninstall it. any idea why? I think it is because of the PATH. But I don't know what should I do with this. I am fairly new in this field.
Found the problem
I was using ubuntu at azure VM, I need to use sh ./createPeerAdminCard.sh
instead of ./createPeerAdminCard.sh
. I am not sure why this works. In my amazon VM I don't need to put this SH, so if anyone know why this sh
thing is works at azure, but not at amazon, please share why.