chainspace-go
chainspace-go copied to clipboard
'make contract' command fails
I'm trying to run this code locally on my machine. I followed instructions from Docs.
Though chainspace is installed as I'm able to run chainspace genload command successfully, but make contract fails with this error: go: go.mod file not found in current directory or any parent directory; see 'go help modules'
Adding screenshot for reference

Modified ./chainspace-go/dummycontract/Dockerfile
FROM golang:alpine AS build
COPY . /go/src/chainspace.io/dummychecker
WORKDIR /go/src/chainspace.io/dummychecker
ADD . .
RUN go mod init
RUN CGO_ENABLED=0 GOOS=linux go build -a -tags netgo -ldflags '-w'
FROM scratch
COPY --from=build /go/src/chainspace.io/dummychecker/dummychecker /dummychecker
ENTRYPOINT ["/dummychecker"]
I added ADD . . and RUN go mod init before the RUN CGO_.. line and go.mod is not issue anymore, but it throws another error: go install: version is required when current directory is not in a module
Attaching screenshot for reference:

Using @latest suffix didn't help, as it threw another error as follows:

Hey -- no one is maintaining this code since the chainspace team joined Novi / FB back in Feb 3, 2019 :(