Seklfreak / discord-image-downloader-go

A simple tool which downloads pictures posted in discord channels of your choice to a local folder.
MIT License
349 stars 91 forks source link

Cannot build on Go 1.15.5 on macOS #193

Closed carlca closed 3 years ago

carlca commented 3 years ago

Hello, you don't provide an executable for this for macOS, and when I try to build using go build ... after a scary amount of dependency/modules related messages, it eventually falls down with an error about nats-io. To be fair, from what I've read, the problem stems from an Modules related error at the nats-io end of things, rather than any problem with your package. This is the error I get...

go: found golang.org/x/image/font/inconsolata in golang.org/x/image v0.0.0-20200927104501-e162460cd6b5
go: found github.com/kr/pretty in github.com/kr/pretty v0.2.1
go: github.com/go-kit/kit/examples/stringsvc4 imports
    github.com/nats-io/go-nats: github.com/nats-io/go-nats@v1.8.1: parsing go.mod:
    module declares its path as: github.com/nats-io/nats.go
            but was required as: github.com/nats-io/go-nats

I've tried a few suggested fixes. Maybe they are out of date, but none of them work. I've also left a message on the Golang forum so if I get an answer there, I'll let you know.

carlca commented 3 years ago

Weirdly, the problem occurs if I build from the command line under go 1.15.5, yet if I build from within VS Code, using go: build workspace, it builds successfully. I can work with this now. I'm just very puzzled as to why it's happening...