3

I a trying to deploy my blockchain network on a cloud server, but the following command to deploy the bna file on the running hyperledger instance fails:

composer network deploy -a basic-sample-network.bna -p hlfv1 -i PeerAdmin -s randomString

I have tried the following things:

  • uninstalling and installing composer-cli

  • uninstalling and then installing node and npm.

    I am getting an error as mentioned in the title. Any help would be much appreciated. Thanks

Community
  • 1
  • 1
Nitin Kumar
  • 69
  • 10

6 Answers6

1

This usually indicates an upstream install issue. E.g. failing to compile npm native modules. Are you sure that the npm install -g composer-cli actually worked? What do you see if you run composer --version?

Dan Selman
  • 2,287
  • 2
  • 9
  • 18
  • Earlier i had v0.9.1 for each of the following dependencies after which i ran `npm install -g composer-cli@0.8`, now `composer --version` returns this: -`composer-cli v0.8.1 composer-admin v0.8.1 composer-client v0.8.1 composer-common v0.8.1 composer-runtime-hlf v0.8.1 composer-runtime-hlfv1 v0.8.1` – Nitin Kumar Jul 12 '17 at 06:58
1

try this. It worked for me

$ npm install grpc
dangtuan21
  • 73
  • 1
  • 7
  • I was getting ::Error: Failed to load connector module "composer-connector-hlfv1" for connection type "hlfv1". It seemed grpc was somehow removed.Your solutions worked :) – nilakantha singh deo Mar 15 '18 at 05:38
0

Under root and navigate to your composer-cli installed folder (I have this: /usr/local/lib/node_modules/composer-cli) and run npm unsafe rebuild (npm rebuild --unsafe-perm)

0

In my case, I had installed node globally, and it has npm and node_modules installed prior to working with HyperLedger. HyperLedger documentation asks to use nvm and hence I used it. This caused issues and I could not complete the composer related tasks.

I ended up deleting the node/nvm completely from my Mac, and installed nvm and continued with the installation of Fabric related node module installation into this localized node installation.

Things just worked smoothly from that point on.

Krishna Vedula
  • 1,643
  • 1
  • 27
  • 31
0

I had a prior version of node and npm installed and this caused several steps to fail and succeed later. Hence, I completely uninstalled Node,NPM and reinstalled NVM and node via [NVM].1

All my problems simply vanished.

Krishna Vedula
  • 1,643
  • 1
  • 27
  • 31
0

After trying multiple times to fix the error, I fixed it as follows:

First of all, make sure you only have a single node installed. You can check this using:

node -v
nvm run node --version

or

nvm ls-remote node

If there are two versions of Node which was my case remove the latest(or the other)

nvm uninstall 9.8.0(LATEST)
nvm use 8.10.0(OLD)
nvm alias default v8.10.0 (vOLD)

Second, make sure the composer-cli version and the composer-client version are the same as well.

Lastly, run your Nodejs code and let us know if it works.

Fthi.a.Abadi
  • 324
  • 2
  • 8