cycloidio / terracost

Cloud cost estimation for Terraform in your CLI
MIT License
278 stars 29 forks source link

Unable to Install TerraCost on Mac on zsh #90

Closed ameyaagashe closed 1 year ago

ameyaagashe commented 1 year ago

Hello,

The command provided to install Terracost is deprecated

Provided Instruction:

go get github.com/cycloidio/terracost

Error:

go: go.mod file not found in current directory or any parent directory.
        'go get' is no longer supported outside a module.
        To build and install a command, use 'go install' with a version,
        like 'go install example.com/cmd@latest'
        For more information, see https://golang.org/doc/go-get-install-deprecation
        or run 'go help get' or 'go help install'.

I, therefore, tried the new command.

go install github.com/cycloidio/terracost 
go: 'go install' requires a version when the current directory is not in a module
Try 'go install github.com/cycloidio/terracost@latest' to install the latest version

As you see, even that did not work, so tried the recommended command. It still gives me an error.

go install github.com/cycloidio/terracost@latest
go: github.com/cycloidio/terracost@latest (in github.com/cycloidio/terracost@v0.5.1):
        The go.mod file for the module providing named packages contains one or
        more replace directives. It must not contain directives that would cause
        it to be interpreted differently than if it were the main module.