I was facing the same issue and I found this solution for configuration:
blockchain-explorer/app/platform/fabric/config.json
{
"network-config": {
"org1": {
"name": "Org1",
"mspid": "Org1MSP",
"peer1": {
"requests": "grpc://127.0.0.1:7051",
"events": "grpc://127.0.0.1:7053",
"server-hostname": "peer0.org1.example.com"
},
"admin": {
"key": "/home/rob/fabric-dev-servers/fabric-scripts/hlfv11/composer/crypto-config/peerOrganizations/org1.example.com/users/Admin@org1.example.com/msp/keystore",
"cert": "/home/rob/fabric-dev-servers/fabric-scripts/hlfv11/composer/crypto-config/peerOrganizations/org1.example.com/users/Admin@org1.example.com/msp/signcerts"
}
}
},
"channel": "composerchannel",
"orderers":[
{
"mspid": "OrdererMSP",
"server-hostname":"orderer.example.com",
"requests":"grpc://127.0.0.1:7050"
}
],
"keyValueStore": "/tmp/fabric-client-kvs",
"configtxgenToolPath": "fabric-path/fabric-samples/bin",
"eventWaitTime": "30000",
"license": "Apache-2.0",
"version": "1.1"
}
The changes made in the original file are follows:
- name of the org ( "name": "Org1" ),
- I removed the TLS certificate references since the Dev fabric doesn't use TLS,
- I changed the urls to grpc instead of grpcs,
- I pointed the admin cert and key to my locations.
- Channel name.
Now to build the app, run these commands
cd blockchain-explorer/app/test
npm install
cd ../
npm install
cd test
npm run test
cd blockchain-explorer
npm install
cd client/
npm install
npm test -- -u --coverage
npm run build
It worked for me!