Search code examples
couchdbhyperledger-fabrichyperledger-chaincode

confusion on setting fabric path


I am trying to run this command

peer chaincode invoke -o localhost:7050 --ordererTLSHostnameOverride orderer.example.com --tls --cafile "${PWD}/organizations/ordererOrganizations/example.com/orderers/orderer.example.com/msp/tlscacerts/tlsca.example.com-cert.pem" -C mychannel -n ledger -c '{"Args":["CreateAsset","asset1","blue","5","tom","35"]}'

And i get this error

Fatal error when initializing core config : Could not find config file. Please make sure that FABRIC_CFG_PATH is set to a path which contains core.yaml

I am following this tutorial https://hyperledger-fabric.readthedocs.io/en/release-2.2/couchdb_tutorial.html#enable-couchdb-in-hyperledger-fabric and i am confused about where i did wrong.

my core.yml file is set into this location core.png I didnt change anything so far.


Solution

  • My path were at this folder. So i fixed it with this command.

    ricky@rr:~/fabric/fabric-samples/test-network$ export PATH=${PWD}/../bin:$PATH
    ricky@rr:~/fabric/fabric-samples/test-network$ export FABRIC_CFG_PATH=$PWD/../config/