[Solved] Error: error getting chaincode bytes: ‘go list‘ failed with: cannot find module providing package


Execute the packing command.
peer lifecycle chaincode package sacc.tar.gz
–path github.com/hyperledger/fabric-cluster/chaincode/go/
–label sacc_1

Error Messages:

Error: error getting chaincode bytes: ‘go list’ failed with: cannot find module providing package github.com/hyperledger/fabric-cluster/chaincode/go: working directory is not part of a module: exit status 1

Solution:

The command go env -w GO111MODULE=auto solves this problem

Read More: