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

Failed to get modules #36

Open
mangokingTW opened this issue Nov 18, 2019 · 5 comments
Open

Failed to get modules #36

mangokingTW opened this issue Nov 18, 2019 · 5 comments

Comments

@mangokingTW
Copy link

$ go get github.com/hashicorp/terraform-config-inspect
package github.com/hashicorp/hcl/v2: cannot find package "github.com/hashicorp/hcl/v2" in any of:
        /usr/local/go/src/github.com/hashicorp/hcl/v2 (from $GOROOT)
package github.com/hashicorp/hcl/v2/gohcl: cannot find package "github.com/hashicorp/hcl/v2/gohcl" in any of:              /usr/local/go/src/github.com/hashicorp/hcl/v2/gohcl (from $GOROOT)
package github.com/hashicorp/hcl/v2/hclparse: cannot find package "github.com/hashicorp/hcl/v2/hclparse" in any of:        /usr/local/go/src/github.com/hashicorp/hcl/v2/hclparse (from $GOROOT)
package github.com/hashicorp/hcl/v2/hclsyntax: cannot find package "github.com/hashicorp/hcl/v2/hclsyntax" in any of:
        /usr/local/go/src/github.com/hashicorp/hcl/v2/hclsyntax (from $GOROOT)

I see the lastest commit updated the module to hcl/v2.
But I didn't see it in github.com/hashicorp/hcl

@kiranjthomas
Copy link

kiranjthomas commented Nov 20, 2019

Posting this in case anyone else needed to be temporarily unblocked. I forked the repo and reverted the last commit here: https://github.com/kiranjthomas/terraform-config-inspect

@jstewmon
Copy link
Contributor

jstewmon commented Nov 26, 2019

To go get in module mode when there is no go.mod file in the current directory, you have to explicitly run go get in module-aware mode by setting GO111MODULE=on - e.g.GO111MODULE=on go get github.com/hashicorp/terraform-config-inspect

https://golang.org/cmd/go/#hdr-Module_support

@hornetmadness
Copy link

Posting this in case anyone else needed to be temporarily unblocked. I forked the repo and reverted the last commit here: https://github.com/kiranjthomas/terraform-config-inspect

This worked like a charm.

@sblack4
Copy link

sblack4 commented May 18, 2020

Posting this in case anyone else needed to be temporarily unblocked. I forked the repo and reverted the last commit here: https://github.com/kiranjthomas/terraform-config-inspect

Thank you! Running the below allowed me to run terraform-config-inspect 😄

go get github.com/kiranjthomas/terraform-config-inspect

@osterman
Copy link

osterman commented Dec 7, 2020

Relates to #57

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants