You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
The text was updated successfully, but these errors were encountered:
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:
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, butmake 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
The text was updated successfully, but these errors were encountered: