This repository has been archived by the owner on Jan 31, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 156
Errors & Fixes
lquintai edited this page Dec 15, 2020
·
1 revision
- All Go projects (developed with or without Go modules) need to be a subdirectory of GOPATH
- Go projects using modules (file go.mod is present) can be anywhere in the filesystem
- Go projects that do not use modules need to be a subdirectory of GOPATH
- The user will need to vendor shim before packaging the contract
- The contracts do not require shim to be vendored
chaincode installed to peer but could not build chaincode: external builder failed: external builder failed to build: external builder 'golang' failed: exit status 1
Instantiating a Go contract in a node running fabric 2, with a v1.4 capability channel. Error might be coming from:
- Not having vendored shim, in case of a project without modules
Fix: vendor shim
- Contract not a subdirectory of GOPATH
Fix: make sure contract is subdirectory of GOPATH before packaging
error starting container: Failed to generate platform-specific docker build: Error returned from build: 1 "can't load package: package </path/to/project>: import "<path/to/project>": cannot import absolute path
Instantiating a Go contract in a node running fabric 1.4, with a v1.4 capability channel. Error might be coming from:
- Contract not a subdirectory of GOPATH
Fix: make sure contract is subdirectory of GOPATH before packaging