Search code examples
hyperledger-fabrichyperledgerhyperledger-composer

Hyperledger composer install is not installing business network


I am using Ubuntu 16.04.2 LTS as VM, and composer v0.19.1. I have installed all the prerequisites as well as hyperledger composer and fabric by folowing the documents at hyperledger composer playgroung. I have followed the tutorial line by line to make a business network. When I want to install the business network by the following command:

composer network install --card PeerAdmin@hlfv1 --archiveFile tutorial-network@0.0.1.bna

It gives me the following error:

No connection type provided, probably because the connection profile has no 'x-type' property defined.

The screen shot of the error is provided as well.

enter image description here

I have checked and made sure that PeerAdminCard exists by

composer card list

And of course Fabric is started. I highly appreciate if someone mentions what I am doing wrong. Thank you.


Solution

  • I was getting exactly the same error as you. Turns out if you update the Composer from version 0.16 or earlier, the card store still has the old PeerAdmin card which is now not compatible with version 0.19. Even deleting the card using composer card delete --card <CARD_NAME_HERE> doesn't work. The quick and dirty solution is to manually delete the card store. It is normally in ${HOME}/.composer, so to deleting this directory should work.

    rm -fr ${HOME}/.composer
    

    For your other problems, the easiest solution is to replace your older version of Hyperledger and do a new install from scratch. That means removing composer as well as killing and removing all previous Docker containers:

    docker kill $(docker ps -q)
    docker rm $(docker ps -aq)
    docker rmi $(docker images dev-* -q)
    

    Basically start from a clean slate if you can!