Difficulty installing go buffalo using go mod on windows

422 views Asked by At

I am very new to golang. I am trying to work with the gomod. Trying to explore the go buffalo framework. But finding a bit of difficulty in installing that.

What I have done:

  1. I saw that go get is nomore supported for buffalo and so switched to go modules.

  2. Created a module by go mod init github.com/webbuffalotest

  3. Fetched go get -v github.com/gobuffalo/buffalo (on the same directory where I have go.mod file)

  4. Fetched go get -v github.com/mattn/go-sqlite3 (on the same directory where I have go.mod file)

  5. go install github.com/gobuffalo/buffalo

  6. I was expecting a buffalo.exe inside %GOPATH%/bin so that I can add it to my path but didn't find one.

My question is what's wrong? Is the exe not installed or it's somewhere else because of go mod. Any help will be highly appreciated.

go.mod content

I am using windows 10. I am not willing to install package managers as scoop or choco to install buffalo. Thanks for your patience :)

Edited: Also tried setting set GO111MODULE=on but of no use.

Solved:

My bad, I should have used go install github.com/gobuffalo/buffalo/buffalo instead of go install github.com/gobuffalo/buffalo

1

There are 1 answers

0
bcmills On BEST ANSWER

github.com/gobuffalo/buffalo is a library; the corresponding binary is (aptly-named) github.com/gobuffalo/buffalo/buffalo.

The go install command you ran should have warned you about that, but didn't because go install used to also be used to cache compiled libraries (it no longer does that in module mode).

I've filed https://golang.org/issue/46912 to add a diagnostic.