google-cloud-go icon indicating copy to clipboard operation
google-cloud-go copied to clipboard

Unknown import path cloud.google.com/compute/metadata when using go modules

Open maxfofocker opened this issue 8 years ago • 2 comments

my error log is

../../../.gvm/pkgsets/go1.11.2/global/pkg/mod/golang.org/x/[email protected]/google/default.go:17:2: unknown import path "cloud.google.com/go/compute/metadata": ambiguous import: found cloud.google.com/go/compute/metadata in multiple modules:
	cloud.google.com/go v0.33.1 (~/.gvm/pkgsets/go1.11.2/global/pkg/mod/cloud.google.com/[email protected]/compute/metadata)
	cloud.google.com/go/compute/metadata v0.0.0-20181114215827-b51c7c77b284 (~/.gvm/pkgsets/go1.11.2/global/pkg/mod/cloud.google.com/go/compute/[email protected])

I still can not to solve this error in my project.

my go version is : go version go1.11.2 darwin/amd64

maxfofocker avatar Nov 20 '18 09:11 maxfofocker

It seems as though you have some out-of-date code dependencies. Could you try updating everything, including oauth2, and blowing away any references to the defunct compute/metadata module (incl in your go module cache).

Context: we recently removed an erroneously-added module.

jeanbza avatar Nov 20 '18 18:11 jeanbza

Closing this due to lack of reply. Give a shout if you still have followup questions!

jeanbza avatar Dec 04 '18 17:12 jeanbza