Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cmd/go: "error loading module requirements" from 'go mod download' #29213

Closed
TPTan96 opened this issue Dec 13, 2018 · 3 comments

Comments

Projects
None yet
5 participants
@TPTan96
Copy link

commented Dec 13, 2018

What version of Go are you using (go version)?

$ go version
go version go1.11.2 windows/amd64

What operating system and processor architecture are you using (go env)?

go env Output
$ go env
set GOARCH=amd64
set GOBIN=
set GOCACHE=C:\Users\tptan\AppData\Local\go-build
set GOEXE=.exe
set GOFLAGS=
set GOHOSTARCH=amd64
set GOHOSTOS=windows
set GOOS=windows
set GOPATH=C:\Users\tptan\go
set GOPROXY=
set GORACE=
set GOROOT=C:\Go
set GOTMPDIR=
set GOTOOLDIR=C:\Go\pkg\tool\windows_amd64
set GCCGO=gccgo
set CC=gcc
set CXX=g++
set CGO_ENABLED=1
set GOMOD=C:\Users\tptan\go\src\API\API\go.mod
set CGO_CFLAGS=-g -O2
set CGO_CPPFLAGS=
set CGO_CXXFLAGS=-g -O2
set CGO_FFLAGS=-g -O2
set CGO_LDFLAGS=-g -O2
set PKG_CONFIG=pkg-config
set GOGCCFLAGS=-m64

What did you do?

Create an image docker

What did you expect to see?

an image

What did you see instead?

Step 6/10 : RUN go mod download
---> Running in 414efa3e565e
go: finding github.com/gorilla/mux v1.6.2
go: github.com/gorilla/mux@v1.6.2: unknown revision v1.6.2
go: error loading module requirements
The command '/bin/sh -c go mod download' returned a non-zero code: 1

@agnivade

This comment has been minimized.

Copy link
Member

commented Dec 13, 2018

Please mention the exact steps so that we can reproduce this at our end.

What is the Dockerfile ? What is the repo ? Is there a go.mod ?

This is what I get -

$go mod init github.com/agnivade/mux
$go get github.com/gorilla/mux@v1.6.2
go: finding github.com/gorilla/mux v1.6.2
go: downloading github.com/gorilla/mux v1.6.2
$cat go.mod 
module github.com/agnivade/mux

require github.com/gorilla/mux v1.6.2 // indirect

@bcmills bcmills added this to the Go1.13 milestone Dec 14, 2018

@bcmills bcmills changed the title I used "RUN go mod download" but go: error loading module requirements cmd/go: "error loading module requirements" from 'go mod download' Dec 14, 2018

@gopherbot

This comment has been minimized.

Copy link

commented Jan 14, 2019

Timed out in state WaitingForInfo. Closing.

(I am just a bot, though. Please speak up if this is a mistake or you have the requested information.)

@gopherbot gopherbot closed this Jan 14, 2019

@varuntechie

This comment has been minimized.

Copy link

commented May 6, 2019

Facing the same error
" go clean -modcache
go: finding github.com/pkg/errors v0.8.1
go: finding github.com/go-sql-driver/mysql v1.4.1
go: finding github.com/go-goracle/goracle v2.1.14+incompatible
go: github.com/go-goracle/goracle@v2.1.14+incompatible: unknown revision v2.1.14
go: github.com/go-sql-driver/mysql@v1.4.1: unknown revision v1.4.1
go: github.com/pkg/errors@v0.8.1: unknown revision v0.8.1
go: finding gopkg.in/goracle.v2 v2.13.1
go: gopkg.in/goracle.v2@v2.13.1: unknown revision v2.13.1
go: error loading module requirement"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.