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: "cannot find module for path" #27238

Closed
sword2ya opened this issue Aug 26, 2018 · 21 comments

Comments

Projects
None yet
@sword2ya
Copy link

commented Aug 26, 2018

What did you do?

First , I cleaned $GOPATH/pkg/mod ,

then I wrote a program under ~/testgo/main.go

package main

import "github.com/sirupsen/logrus"

func main() {
	logrus.Infoln("hello world")
}

and then I typed cmmand: go mod init testgo on then same directory. And the go.mod file is:

module testgo

What did you expect to see?

build success without any error.

What did you see instead?

it build failed with output as below:

go: finding github.com/sirupsen/logrus v1.0.6
go: downloading github.com/sirupsen/logrus v1.0.6
go: finding golang.org/x/sys/unix latest
go: finding golang.org/x/crypto/ssh/terminal latest
go: finding golang.org/x/sys latest
go: downloading golang.org/x/sys v0.0.0-20180824143301-4910a1d54f87
go: finding golang.org/x/crypto/ssh latest
go: finding golang.org/x/crypto latest
build testgo: cannot find module for path golang.org/x/crypto/ssh/terminal

and now the go.mod file is:

module testgo

require (
	github.com/sirupsen/logrus v1.0.6
	golang.org/x/sys v0.0.0-20180824143301-4910a1d54f87 // indirect
)

until I add all of cannot find modules to go.mod by myself .

More infomation

I'm in China but I had set the https_proxy and http_proxy, so I can visit google.com and golang.org.

The error module is not always the golang.org/x/crypto, it say sometimes golang/x/sys or golang/x/net

System details

GOARCH="amd64"
GOBIN=""
GOCACHE="/home/anjiawei/.cache/go-build"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOOS="linux"
GOPATH="/home/anjiawei/go"
GOPROXY=""
GORACE=""
GOROOT="/usr/local/go"
GOTMPDIR=""
GOTOOLDIR="/usr/local/go/pkg/tool/linux_amd64"
GCCGO="gccgo"
CC="gcc"
CXX="g++"
CGO_ENABLED="1"
GOMOD="/home/anjiawei/testgo/go.mod"
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build193967317=/tmp/go-build -gno-record-gcc-switches"

@sword2ya sword2ya changed the title "go build" can't work on outside GOPATH modules (version 1.11)"go build" can't work on outside GOPATH modules Aug 26, 2018

@yuqaf1989

This comment has been minimized.

Copy link

commented Aug 28, 2018

The similar error occurred on my machine

cannot find module for path golang.org/x/crypto/ssh

but I can find the ssh module in my $GOPATH

@agnivade

This comment has been minimized.

Copy link
Member

commented Aug 28, 2018

Can you paste the output of go build -v -x ?

@sword2ya

This comment has been minimized.

Copy link
Author

commented Aug 28, 2018

as follows:

WORK=/tmp/go-build632749108
Fetching https://golang.org/x/crypto/ssh/terminal?go-get=1
Parsing meta tags from https://golang.org/x/crypto/ssh/terminal?go-get=1 (status code 200)
get "golang.org/x/crypto/ssh/terminal": found meta tag get.metaImport{Prefix:"golang.org/x/crypto", VCS:"git", RepoRoot:"https://go.googlesource.com/crypto"} at https://golang.org/x/crypto/ssh/terminal?go-get=1
get "golang.org/x/crypto/ssh/terminal": verifying non-authoritative meta tag
Fetching https://golang.org/x/crypto?go-get=1
Parsing meta tags from https://golang.org/x/crypto?go-get=1 (status code 200)
# /home/anjiawei/go/pkg/mod/cache/vcs/de5fd3af413a4f3f969455ae522b4002fcb7bb4c158f339396dfc77710c9007d for git2 https://go.googlesource.com/crypto
cd /home/anjiawei/go/pkg/mod/cache/vcs/de5fd3af413a4f3f969455ae522b4002fcb7bb4c158f339396dfc77710c9007d; git ls-remote -q https://go.googlesource.com/crypto
6.064s # cd /home/anjiawei/go/pkg/mod/cache/vcs/de5fd3af413a4f3f969455ae522b4002fcb7bb4c158f339396dfc77710c9007d; git ls-remote -q https://go.googlesource.com/crypto
go: finding golang.org/x/crypto/ssh/terminal latest
cd /home/anjiawei/go/pkg/mod/cache/vcs/de5fd3af413a4f3f969455ae522b4002fcb7bb4c158f339396dfc77710c9007d; git -c log.showsignature=false log -n1 '--format=format:%H %ct %D' 614d502a4dac94afa3a6ce146bd1736da82514c6
0.004s # cd /home/anjiawei/go/pkg/mod/cache/vcs/de5fd3af413a4f3f969455ae522b4002fcb7bb4c158f339396dfc77710c9007d; git -c log.showsignature=false log -n1 '--format=format:%H %ct %D' 614d502a4dac94afa3a6ce146bd1736da82514c6
cd /home/anjiawei/go/pkg/mod/cache/vcs/de5fd3af413a4f3f969455ae522b4002fcb7bb4c158f339396dfc77710c9007d; git tag -l
0.004s # cd /home/anjiawei/go/pkg/mod/cache/vcs/de5fd3af413a4f3f969455ae522b4002fcb7bb4c158f339396dfc77710c9007d; git tag -l
cd /home/anjiawei/go/pkg/mod/cache/vcs/de5fd3af413a4f3f969455ae522b4002fcb7bb4c158f339396dfc77710c9007d; git fetch -f --depth=1 https://go.googlesource.com/crypto 614d502a4dac94afa3a6ce146bd1736da82514c6:refs/dummy
14.215s # cd /home/anjiawei/go/pkg/mod/cache/vcs/de5fd3af413a4f3f969455ae522b4002fcb7bb4c158f339396dfc77710c9007d; git fetch -f --depth=1 https://go.googlesource.com/crypto 614d502a4dac94afa3a6ce146bd1736da82514c6:refs/dummy
cd /home/anjiawei/go/pkg/mod/cache/vcs/de5fd3af413a4f3f969455ae522b4002fcb7bb4c158f339396dfc77710c9007d; git fetch -f https://go.googlesource.com/crypto 'refs/heads/*:refs/heads/*' 'refs/tags/*:refs/tags/*'
13.172s # cd /home/anjiawei/go/pkg/mod/cache/vcs/de5fd3af413a4f3f969455ae522b4002fcb7bb4c158f339396dfc77710c9007d; git fetch -f https://go.googlesource.com/crypto 'refs/heads/*:refs/heads/*' 'refs/tags/*:refs/tags/*'
Fetching https://golang.org/x/crypto/ssh?go-get=1
Parsing meta tags from https://golang.org/x/crypto/ssh?go-get=1 (status code 200)
get "golang.org/x/crypto/ssh": found meta tag get.metaImport{Prefix:"golang.org/x/crypto", VCS:"git", RepoRoot:"https://go.googlesource.com/crypto"} at https://golang.org/x/crypto/ssh?go-get=1
get "golang.org/x/crypto/ssh": verifying non-authoritative meta tag
go: finding golang.org/x/crypto/ssh latest
Fetching https://golang.org/x/crypto?go-get=1
Parsing meta tags from https://golang.org/x/crypto?go-get=1 (status code 200)
get "golang.org/x/crypto": found meta tag get.metaImport{Prefix:"golang.org/x/crypto", VCS:"git", RepoRoot:"https://go.googlesource.com/crypto"} at https://golang.org/x/crypto?go-get=1
go: finding golang.org/x/crypto latest
Fetching https://golang.org/x?go-get=1
Parsing meta tags from https://golang.org/x?go-get=1 (status code 200)
Fetching https://golang.org?go-get=1
Parsing meta tags from https://golang.org?go-get=1 (status code 200)
build testgo: cannot find module for path golang.org/x/crypto/ssh/terminal
@agnivade

This comment has been minimized.

Copy link
Member

commented Aug 28, 2018

@FiloSottile FiloSottile changed the title (version 1.11)"go build" can't work on outside GOPATH modules cmg/go: "cannot find module for path" Aug 30, 2018

@FiloSottile FiloSottile changed the title cmg/go: "cannot find module for path" cmd/go: "cannot find module for path" Aug 30, 2018

@FiloSottile FiloSottile added this to the Go1.12 milestone Aug 30, 2018

@RocFang

This comment has been minimized.

Copy link

commented Sep 6, 2018

same problem with the package golang.org/x/sys/unix.

@bcmills

This comment has been minimized.

Copy link
Member

commented Sep 6, 2018

What version of the go toolchain are you using?

This looks like the same symptoms as a bug that was fixed in 1.11beta2 or 1.11rc1.

@imhotepio

This comment has been minimized.

Copy link

commented Sep 7, 2018

+1 Getting similar issue in go v 1.11. Any updates or workaround?

Cannot find module for path golang.org/x/text/secure/bidirule
...
Fetching https://golang.org/x/text/secure/bidirule?go-get=1
Parsing meta tags from https://golang.org/x/text/secure/bidirule?go-get=1 (status code 200)
get "golang.org/x/text/secure/bidirule": found meta tag get.metaImport{Prefix:"golang.org/x/text", VCS:"git", RepoRoot:"https://go.googlesource.com/text"} at https://golang.org/x/text/secure/bidirule?go-get=1
get "golang.org/x/text/secure/bidirule": verifying non-authoritative meta tag
go: finding golang.org/x/text/secure/bidirule latest
cd go/pkg/mod/cache/vcs/5b03666c2d7b526129bad48c5cea095aad8b83badc1daa202e7b0279e3a5d861; git cat-file blob 4ae1256249243a4eb350a9a372e126557f2aa346:secure/bidirule/go.mod
0.006s # cd go/pkg/mod/cache/vcs/5b03666c2d7b526129bad48c5cea095aad8b83badc1daa202e7b0279e3a5d861; git cat-file blob 4ae1256249243a4eb350a9a372e126557f2aa346:secure/bidirule/go.mod
Fetching https://golang.org/x/text/secure?go-get=1
Parsing meta tags from https://golang.org/x/text/secure?go-get=1 (status code 200)
get "golang.org/x/text/secure": found meta tag get.metaImport{Prefix:"golang.org/x/text", VCS:"git", RepoRoot:"https://go.googlesource.com/text"} at https://golang.org/x/text/secure?go-get=1
get "golang.org/x/text/secure": verifying non-authoritative meta tag
go: finding golang.org/x/text/secure latest
cd go/pkg/mod/cache/vcs/5b03666c2d7b526129bad48c5cea095aad8b83badc1daa202e7b0279e3a5d861; git cat-file blob 4ae1256249243a4eb350a9a372e126557f2aa346:secure/go.mod
0.006s # cd go/pkg/mod/cache/vcs/5b03666c2d7b526129bad48c5cea095aad8b83badc1daa202e7b0279e3a5d861; git cat-file blob 4ae1256249243a4eb350a9a372e126557f2aa346:secure/go.mod
Fetching https://golang.org/x/text/unicode/bidi?go-get=1
Parsing meta tags from https://golang.org/x/text/unicode/bidi?go-get=1 (status code 200)
get "golang.org/x/text/unicode/bidi": found meta tag get.metaImport{Prefix:"golang.org/x/text", VCS:"git", RepoRoot:"https://go.googlesource.com/text"} at https://golang.org/x/text/unicode/bidi?go-get=1
get "golang.org/x/text/unicode/bidi": verifying non-authoritative meta tag
go: finding golang.org/x/text/unicode/bidi latest
cd go/pkg/mod/cache/vcs/5b03666c2d7b526129bad48c5cea095aad8b83badc1daa202e7b0279e3a5d861; git cat-file blob 4ae1256249243a4eb350a9a372e126557f2aa346:unicode/bidi/go.mod
0.005s # cd go/pkg/mod/cache/vcs/5b03666c2d7b526129bad48c5cea095aad8b83badc1daa202e7b0279e3a5d861; git cat-file blob 4ae1256249243a4eb350a9a372e126557f2aa346:unicode/bidi/go.mod
16.477s # cd go/pkg/mod/cache/vcs/70a2f246b82ec44ed4585aa2fce0516a01c564496f1ed2f026b01d18086f5282; git -c protocol.version=0 fetch --unshallow -f originrefs/tags/v2.0.0:refs/tags/v2.0.0 refs/tags/v2.0.0-alpha.0:refs/tags/v2.0.0-alpha.0 refs/tags/v2.0.0-alpha.1:refs/tags/v2.0.0-alpha.1 refs/tags/v3.0.0:refs/tags/v3.0.0 refs/tags/v3.0.0-beta.0:refs/tags/v3.0.0-beta.0 refs/tags/v4.0.0:refs/tags/v4.0.0 refs/tags/v4.0.0-beta.0:refs/tags/v4.0.0-beta.0 refs/tags/v5.0.0:refs/tags/v5.0.0 refs/tags/v5.0.1:refs/tags/v5.0.1 refs/tags/v6.0.0:refs/tags/v6.0.0 refs/tags/v7.0.0:refs/tags/v7.0.0
cd go/pkg/mod/cache/vcs/70a2f246b82ec44ed4585aa2fce0516a01c564496f1ed2f026b01d18086f5282; git cat-file --batch
0.007s # cd go/pkg/mod/cache/vcs/70a2f246b82ec44ed4585aa2fce0516a01c564496f1ed2f026b01d18086f5282; git cat-file --batch

@bcmills

This comment has been minimized.

Copy link
Member

commented Sep 7, 2018

Ok, that's interesting. There may be a bad interaction here with the fix for #26885: it looks like we're not crawling up to the module root for these subpackages for some reason.

@glenfordwilliams

This comment has been minimized.

Copy link

commented Sep 13, 2018

having a similar issue

[kingwill101@localhost go-strest]$ go buildgo: finding golang.org/x/crypto/ssh/terminal latest
go: finding golang.org/x/crypto/ssh latestgo: finding golang.org/x/crypto latest
build gitlab.com/kingwill101/strest: cannot find module for path golang.org/x/crypto/ssh/terminal

[kingwill101@localhost go-strest]$ go build -v -x
WORK=/tmp/go-build141882220
Fetching https://golang.org/x/crypto/ssh/terminal?go-get=1
Parsing meta tags from https://golang.org/x/crypto/ssh/terminal?go-get=1 (status code 200)
get "golang.org/x/crypto/ssh/terminal": found meta tag get.metaImport{Prefix:"golang.org/x/crypto", VCS:"git", RepoRoot:"https://go.googlesource.com/crypto"} at https://golang.org/x/crypto/ssh/terminal?go-get=1
get "golang.org/x/crypto/ssh/terminal": verifying non-authoritative meta tag
Fetching https://golang.org/x/crypto?go-get=1
Parsing meta tags from https://golang.org/x/crypto?go-get=1 (status code 200)
# /home/kingwill101/go/pkg/mod/cache/vcs/de5fd3af413a4f3f969455ae522b4002fcb7bb4c158f339396dfc77710c9007d for git2 https://go.googlesource.com/crypto
cd /home/kingwill101/go/pkg/mod/cache/vcs/de5fd3af413a4f3f969455ae522b4002fcb7bb4c158f339396dfc77710c9007d; git ls-remote -q https://go.googlesource.com/crypto
2.271s # cd /home/kingwill101/go/pkg/mod/cache/vcs/de5fd3af413a4f3f969455ae522b4002fcb7bb4c158f339396dfc77710c9007d; git ls-remote -q https://go.googlesource.com/crypto
go: finding golang.org/x/crypto/ssh/terminal latest
cd /home/kingwill101/go/pkg/mod/cache/vcs/de5fd3af413a4f3f969455ae522b4002fcb7bb4c158f339396dfc77710c9007d; git -c log.showsignature=false log -n1 '--format=format:%H %ct %D' 0e37d006457bf46f9e6692014ba72ef82c33022c
0.002s # cd /home/kingwill101/go/pkg/mod/cache/vcs/de5fd3af413a4f3f969455ae522b4002fcb7bb4c158f339396dfc77710c9007d; git -c log.showsignature=false log -n1 '--format=format:%H %ct %D' 0e37d006457bf46f9e6692014ba72ef82c33022c
cd /home/kingwill101/go/pkg/mod/cache/vcs/de5fd3af413a4f3f969455ae522b4002fcb7bb4c158f339396dfc77710c9007d; git tag -l
0.002s # cd /home/kingwill101/go/pkg/mod/cache/vcs/de5fd3af413a4f3f969455ae522b4002fcb7bb4c158f339396dfc77710c9007d; git tag -l
cd /home/kingwill101/go/pkg/mod/cache/vcs/de5fd3af413a4f3f969455ae522b4002fcb7bb4c158f339396dfc77710c9007d; git -c log.showsignature=false log -n1 '--format=format:%H %ct %D' 0e37d006457b
0.002s # cd /home/kingwill101/go/pkg/mod/cache/vcs/de5fd3af413a4f3f969455ae522b4002fcb7bb4c158f339396dfc77710c9007d; git -c log.showsignature=false log -n1 '--format=format:%H %ct %D' 0e37d006457b
cd /home/kingwill101/go/pkg/mod/cache/vcs/de5fd3af413a4f3f969455ae522b4002fcb7bb4c158f339396dfc77710c9007d; git cat-file blob 0e37d006457bf46f9e6692014ba72ef82c33022c:ssh/terminal/go.mod
0.002s # cd /home/kingwill101/go/pkg/mod/cache/vcs/de5fd3af413a4f3f969455ae522b4002fcb7bb4c158f339396dfc77710c9007d; git cat-file blob 0e37d006457bf46f9e6692014ba72ef82c33022c:ssh/terminal/go.mod
Fetching https://golang.org/x/crypto/ssh?go-get=1
Parsing meta tags from https://golang.org/x/crypto/ssh?go-get=1 (status code 200)
get "golang.org/x/crypto/ssh": found meta tag get.metaImport{Prefix:"golang.org/x/crypto", VCS:"git", RepoRoot:"https://go.googlesource.com/crypto"} at https://golang.org/x/crypto/ssh?go-get=1
get "golang.org/x/crypto/ssh": verifying non-authoritative meta tag
go: finding golang.org/x/crypto/ssh latest
cd /home/kingwill101/go/pkg/mod/cache/vcs/de5fd3af413a4f3f969455ae522b4002fcb7bb4c158f339396dfc77710c9007d; git cat-file blob 0e37d006457bf46f9e6692014ba72ef82c33022c:ssh/go.mod
0.006s # cd /home/kingwill101/go/pkg/mod/cache/vcs/de5fd3af413a4f3f969455ae522b4002fcb7bb4c158f339396dfc77710c9007d; git cat-file blob 0e37d006457bf46f9e6692014ba72ef82c33022c:ssh/go.mod
Fetching https://golang.org/x/crypto?go-get=1
Parsing meta tags from https://golang.org/x/crypto?go-get=1 (status code 200)
get "golang.org/x/crypto": found meta tag get.metaImport{Prefix:"golang.org/x/crypto", VCS:"git", RepoRoot:"https://go.googlesource.com/crypto"} at https://golang.org/x/crypto?go-get=1
go: finding golang.org/x/crypto latest
cd /home/kingwill101/go/pkg/mod/cache/vcs/de5fd3af413a4f3f969455ae522b4002fcb7bb4c158f339396dfc77710c9007d; git cat-file blob 0e37d006457bf46f9e6692014ba72ef82c33022c:go.mod
0.011s # cd /home/kingwill101/go/pkg/mod/cache/vcs/de5fd3af413a4f3f969455ae522b4002fcb7bb4c158f339396dfc77710c9007d; git cat-file blob 0e37d006457bf46f9e6692014ba72ef82c33022c:go.mod
Fetching https://golang.org/x?go-get=1
Parsing meta tags from https://golang.org/x?go-get=1 (status code 200)
Fetching https://golang.org?go-get=1
Parsing meta tags from https://golang.org?go-get=1 (status code 200)
build gitlab.com/kingwill101/strest: cannot find module for path golang.org/x/crypto/ssh/terminal

@bcmills bcmills self-assigned this Sep 13, 2018

@pedronasser

This comment has been minimized.

Copy link

commented Sep 14, 2018

I was having this issue. I solved it by deleting all my $GOPATH/pkg/mod directory and downloading everything again.
FYI: This issue happened after I run go mod init... in the package and it copied my deps from Godeps (not sure if it has any relation)

@glenfordwilliams

This comment has been minimized.

Copy link

commented Sep 14, 2018

I was having this issue. I solved it by deleting all my $GOPATH/pkg/mod directory and downloading everything again.
FYI: This issue happened after I run go mod init... in the package and it copied my deps from Godeps (not sure if it has any relation)

can confirm that clearing the $GOPATH/pkg "solves" the issue.
now sure if this is related but i noticed that there were a few write protected files listed and i had to force remove them.

@bcmills

This comment has been minimized.

Copy link
Member

commented Sep 14, 2018

i noticed that there were a few write protected files listed and i had to force remove them.

As a general rule, don't force-anything in the module cache. (go clean -modcache is probably what you wanted here.)

@bcmills

This comment has been minimized.

Copy link
Member

commented Sep 14, 2018

@pedronasser

I solved it by deleting all my $GOPATH/pkg/mod directory and downloading everything again.

Had you been using modules before the Go 1.11 release (either in a 1.11 prerelease or using vgo)?

(I'd like to understand whether this sort of module corruption is happening in the wild, or just a pre-release bug that got fixed.)

@pedronasser

This comment has been minimized.

Copy link

commented Sep 14, 2018

@bcmills

@pedronasser

I solved it by deleting all my $GOPATH/pkg/mod directory and downloading everything again.

Had you been using modules before the Go 1.11 release (either in a 1.11 prerelease or using vgo)?

(I'd like to understand whether this sort of module corruption is happening in the wild, or just a pre-release bug that got fixed.)

No, I started using go1.11 recently, installed it using gvm and it creates a different GOPATH for each version.

I was having this issue. I solved it by deleting all my $GOPATH/pkg/mod directory and downloading everything again.
FYI: This issue happened after I run go mod init... in the package and it copied my deps from Godeps (not sure if it has any relation)

can confirm that clearing the $GOPATH/pkg "solves" the issue.
now sure if this is related but i noticed that there were a few write protected files listed and i had to force remove them.

This also happened to me, I had to sudo rm to remove all files.

@bcmills

This comment has been minimized.

Copy link
Member

commented Sep 25, 2018

Folks who have been affected by this: is it possible that you were running multiple 'go' commands concurrently (#26794)? (I'm trying to pin down the cause of the module corruption.)

@DrGo

This comment has been minimized.

Copy link

commented Oct 5, 2018

For me the error occurs when I run go build from within the built-in terminal in vscode but not from within Terminal. Unless vscode is running another instance of the go command, I am only invoking it once.

I am using local package dependency. All packages (including this package main) are in my GOPATH and I have GO111MODULE=on.

go version go1.11.1 darwin/amd64
In vscode,

go build -v -x
WORK=/var/folders/kz/fc7nstbx16q2gvb1w6rry8cm0000gn/T/go-build516570391
# /Users/salah/Dropbox/code/go/pkg/mod/cache/vcs/208f2541fd98099ee44054de3f910ce8801df288c3fc3b33470badade392c02b for git2 https://github.com/drgo/core
cd /Users/salah/Dropbox/code/go/pkg/mod/cache/vcs/208f2541fd98099ee44054de3f910ce8801df288c3fc3b33470badade392c02b; git ls-remote -q https://github.com/drgo/core
0.302s # cd /Users/salah/Dropbox/code/go/pkg/mod/cache/vcs/208f2541fd98099ee44054de3f910ce8801df288c3fc3b33470badade392c02b; git ls-remote -q https://github.com/drgo/core
go: finding github.com/drgo/core/cache latest
cd /Users/salah/Dropbox/code/go/pkg/mod/cache/vcs/208f2541fd98099ee44054de3f910ce8801df288c3fc3b33470badade392c02b; git -c log.showsignature=false log -n1 '--format=format:%H %ct %D' b9476d56599c7f9df52c80dbd6b989d7bf5263ed
0.010s # cd /Users/salah/Dropbox/code/go/pkg/mod/cache/vcs/208f2541fd98099ee44054de3f910ce8801df288c3fc3b33470badade392c02b; git -c log.showsignature=false log -n1 '--format=format:%H %ct %D' b9476d56599c7f9df52c80dbd6b989d7bf5263ed
cd /Users/salah/Dropbox/code/go/pkg/mod/cache/vcs/208f2541fd98099ee44054de3f910ce8801df288c3fc3b33470badade392c02b; git tag -l
0.008s # cd /Users/salah/Dropbox/code/go/pkg/mod/cache/vcs/208f2541fd98099ee44054de3f910ce8801df288c3fc3b33470badade392c02b; git tag -l
cd /Users/salah/Dropbox/code/go/pkg/mod/cache/vcs/208f2541fd98099ee44054de3f910ce8801df288c3fc3b33470badade392c02b; git -c log.showsignature=false log -n1 '--format=format:%H %ct %D' b9476d56599c
0.009s # cd /Users/salah/Dropbox/code/go/pkg/mod/cache/vcs/208f2541fd98099ee44054de3f910ce8801df288c3fc3b33470badade392c02b; git -c log.showsignature=false log -n1 '--format=format:%H %ct %D' b9476d56599c
cd /Users/salah/Dropbox/code/go/pkg/mod/cache/vcs/208f2541fd98099ee44054de3f910ce8801df288c3fc3b33470badade392c02b; git cat-file blob b9476d56599c7f9df52c80dbd6b989d7bf5263ed:cache/go.mod
0.009s # cd /Users/salah/Dropbox/code/go/pkg/mod/cache/vcs/208f2541fd98099ee44054de3f910ce8801df288c3fc3b33470badade392c02b; git cat-file blob b9476d56599c7f9df52c80dbd6b989d7bf5263ed:cache/go.mod
go: finding github.com/drgo/core latest
cd /Users/salah/Dropbox/code/go/pkg/mod/cache/vcs/208f2541fd98099ee44054de3f910ce8801df288c3fc3b33470badade392c02b; git cat-file blob b9476d56599c7f9df52c80dbd6b989d7bf5263ed:go.mod
0.009s # cd /Users/salah/Dropbox/code/go/pkg/mod/cache/vcs/208f2541fd98099ee44054de3f910ce8801df288c3fc3b33470badade392c02b; git cat-file blob b9476d56599c7f9df52c80dbd6b989d7bf5263ed:go.mod
Fetching https://github.com?go-get=1
Parsing meta tags from https://github.com?go-get=1 (status code 200)
build github.com/drgo/web: cannot find module for path github.com/drgo/core/cache

in Terminal:

go build -v -x
WORK=/var/folders/kz/fc7nstbx16q2gvb1w6rry8cm0000gn/T/go-build164987806
@bcmills

This comment has been minimized.

Copy link
Member

commented Oct 8, 2018

@DrGo, I don't see a package github.com/drgo/core/cache either. That's probably not the same underlying issue as the folks having trouble with golang.org/x/crypto/ssh.

@bcmills

This comment has been minimized.

Copy link
Member

commented Oct 8, 2018

@DrGo, I suspect that your issue is #27859 instead.

@bcmills

This comment has been minimized.

Copy link
Member

commented Oct 11, 2018

Given that @DrGo's report has a plausible explanation in #27859 and there haven't been any other replies to my question above (#27238 (comment)), I'm going to proceed on the theory that the remaining cases are explained by #26794 (or, at the very least, will be fixed by the fix for it).

Please do share details if you're able to reproduce one of these failures that does not match either #26794 or #27859.

@luca-moser

This comment has been minimized.

Copy link

commented Oct 21, 2018

Windows 10, 64bit, Go 1.11.1

(to start with a clean state I deleted the mod folder under GOPATH)

  1. create a new dir and init mod go mod init github.com/luca-moser/x
  2. add sample code from https://github.com/iotaledger/iota.go/tree/next to main.go file
  3. run go get output:
$ go get github.com/iotaledger/iota.go@9956d52b951166149844977c04b233c123de2695
go: finding github.com/iotaledger/iota.go 9956d52b951166149844977c04b233c123de2695
go: finding github.com/pkg/errors v0.8.0
go: finding github.com/onsi/ginkgo v1.6.0
go: finding github.com/nbio/st v0.0.0-20140626010706-e9e8d9816f32
go: finding github.com/onsi/gomega v1.4.2
go: finding gopkg.in/h2non/gock.v1 v1.0.10
go: finding github.com/fsnotify/fsnotify v1.4.7
go: finding github.com/hpcloud/tail v1.0.0
go: finding gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7
go: finding gopkg.in/fsnotify.v1 v1.4.7
go: finding gopkg.in/yaml.v2 v2.2.1
go: finding github.com/golang/protobuf v1.2.0
go: finding golang.org/x/net v0.0.0-20180906233101-161cd47e91fd
go: finding golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e
go: finding golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f
go: finding golang.org/x/text v0.3.0
go: finding gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405
FindFirstFile github.com/iotaledger/iota.go: The system cannot find the path specified.

no mod folder is created for the dependencies in GOPATH after the command. contents of cache folder for iota.go package:
image

go.mod file content after command:

module github.com/luca-moser/x

require github.com/iotaledger/iota.go v0.0.0-20181021095135-9956d52b9511 // indirect

go env:

go env
set GOARCH=amd64
set GOBIN=C:\Go\bin
set GOCACHE=C:\Users\Luca\AppData\Local\go-build
set GOEXE=.exe
set GOFLAGS=
set GOHOSTARCH=amd64
set GOHOSTOS=windows
set GOOS=windows
set GOPATH=D:\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=D:\Projects\x\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 -mthreads -fmessage-length=0 -fdebug-prefix-map=C:\Users\Luca\AppData\Local\Temp\go-build162410482=/tmp/go-build -gno-record-gcc-switches
@bcmills

This comment has been minimized.

Copy link
Member

commented Oct 24, 2018

Closing this as a duplicate of #26794: the cases that are solved by clearing the module cache (go clean -modcache) are likely explained by it. If you can reproduce these symptoms with sequential go commands on a clean cache, please file a new issue.

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.