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

TPTan96 opened this issue Dec 13, 2018 · 3 comments


None yet
5 participants
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 GOHOSTARCH=amd64
set GOHOSTOS=windows
set GOOS=windows
set GOPATH=C:\Users\tptan\go
set GOROOT=C:\Go
set GOTOOLDIR=C:\Go\pkg\tool\windows_amd64
set GCCGO=gccgo
set CC=gcc
set CXX=g++
set GOMOD=C:\Users\tptan\go\src\API\API\go.mod
set CGO_CFLAGS=-g -O2
set CGO_FFLAGS=-g -O2
set CGO_LDFLAGS=-g -O2
set PKG_CONFIG=pkg-config

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 v1.6.2
go: unknown revision v1.6.2
go: error loading module requirements
The command '/bin/sh -c go mod download' returned a non-zero code: 1


This comment has been minimized.

Copy link

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
$go get
go: finding v1.6.2
go: downloading v1.6.2
$cat go.mod 

require 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


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


This comment has been minimized.

Copy link

commented May 6, 2019

Facing the same error
" go clean -modcache
go: finding v0.8.1
go: finding v1.4.1
go: finding v2.1.14+incompatible
go: unknown revision v2.1.14
go: unknown revision v1.4.1
go: unknown revision v0.8.1
go: finding v2.13.1
go: 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.