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: go build does not show that git (?) is not installed, instead shows general "cannot find module for path " #29891

Closed
nicknaychov opened this Issue Jan 23, 2019 · 5 comments

Comments

Projects
None yet
4 participants
@nicknaychov
Copy link

nicknaychov commented Jan 23, 2019

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

go version go1.11.4 linux/amd64

Does this issue reproduce with the latest release?

yes

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

go env Output
GOARCH="amd64"
GOBIN=""
GOCACHE="/root/.cache/go-build"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOOS="linux"
GOPATH="/root/GOprojects"
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/nickn/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 -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build125501625=/tmp/go-build -gno-record-gcc-switches"

What did you do?

When you try to enable modules and use go.mod

when you try to run the quick example from https://github.com/golang/go/wiki/Modules
you get
build github.com/you/hello: cannot find module for path rsc.io/quote

BTW error happens does not matter what modules you try to import. Just decided to give simplest example.

What did you expect to see?

you should see clear error that GitHub is not installed on your system.

What did you see instead?

build github.com/you/hello: cannot find module for path rsc.io/quote

which is quite confusing and general error...
Same can be reproduces on Windows as well.

@robpike

This comment has been minimized.

Copy link
Contributor

robpike commented Jan 23, 2019

Do you mean git? GitHub is a web site but it is also a desktop UI for talking to GitHub.

@FiloSottile FiloSottile changed the title go build does not show that Github is not installed, instead shows general "cannot find module for path " gmd/go: go build does not show that git (?) is not installed, instead shows general "cannot find module for path " Jan 23, 2019

@FiloSottile FiloSottile added this to the Go1.13 milestone Jan 23, 2019

@odeke-em odeke-em changed the title gmd/go: go build does not show that git (?) is not installed, instead shows general "cannot find module for path " cmd/go: go build does not show that git (?) is not installed, instead shows general "cannot find module for path " Jan 23, 2019

@agnivade

This comment has been minimized.

Copy link
Member

agnivade commented Jan 24, 2019

This should be fixed in 1.12. Please try with 1.12beta2.

@nicknaychov

This comment has been minimized.

Copy link
Author

nicknaychov commented Jan 24, 2019

@nicknaychov

This comment has been minimized.

Copy link
Author

nicknaychov commented Jan 24, 2019

Thanks for fixing. I lost couple hours reading manuals and wondering why it does not work, my setup was following all official manuals. But those manuals were not mentioning that you need installed git. Please fix that as well for all newbies. Then I gave up, start swearing and decided to go old way and just use go get. That command showed me that git was missing. Once installed everything was working as in the manuals.

@nicknaychov nicknaychov reopened this Jan 24, 2019

@agnivade

This comment has been minimized.

Copy link
Member

agnivade commented Jan 24, 2019

But those manuals were not mentioning that you need installed git. Please fix that as well for all newbies.

Please open a new issue for that, specifically mentioning which docs you felt were missing. This thread already has a different context. Thanks.

@agnivade agnivade closed this Jan 24, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment