gobuffalo / buffalo

Rapid Web Development w/ Go
http://gobuffalo.io
MIT License
8.08k stars 576 forks source link

cannot find package "github.com/gobuffalo/mw-i18n #1622

Closed ghost closed 5 years ago

ghost commented 5 years ago

Seems the default bootstrap is missing the github.com/gobuffalo/mw-i18n ? everything else seems cool...

On MAC.

steps to repro:


brew install gobuffalo/tap/buffalo
buffalo new gohello
cd gohello && buffalo dev
 buffalo dev
buffalo: 2019/03/10 09:57:21 === Rebuild on: :start: ===
buffalo: 2019/03/10 09:57:21 === Running: go build -v -i -tags development -o tmp/gohello-build  (PID: 71388) ===
actions/app.go:13:2: cannot find package "github.com/gobuffalo/mw-i18n" in any of:
        /usr/local/opt/go/libexec/src/github.com/gobuffalo/mw-i18n (from $GOROOT)
        /Users/apple/workspace/go/src/github.com/gobuffalo/mw-i18n (from $GOPATH)
buffalo: 2019/03/10 09:57:22 === Error! ===
buffalo: 2019/03/10 09:57:22 === exit status 1
actions/app.go:13:2: cannot find package "github.com/gobuffalo/mw-i18n" in any of:
        /usr/local/opt/go/libexec/src/github.com/gobuffalo/mw-i18n (from $GOROOT)
        /Users/apple/workspace/go/src/github.com/gobuffalo/mw-i18n (from $GOPATH)
 ===

webpack is watching the files…
leonblack64 commented 5 years ago

Having this issue as well, installing from the default archive

joshrendek commented 5 years ago

@leonblack64 or @gedw99 can either of you post your buffalo info output? Does running a go get -u github.com/gobuffalo/mw-i18n and then running buffalo dev make it work?

leonblack64 commented 5 years ago

@joshrendek Thanks, this fixed it for me. Clearly the package was just missing. I tried to install it manually like you suggested before, but didn't know the right url. Odd that this package is not installed by default, since I was just following the go documentation: https://gobuffalo.io/en/docs/new-project/ This was the error message btw:

actions/app.go:12:2: cannot find package "github.com/gobuffalo/mw-i18n" in any of: /usr/lib/go-1.12/src/github.com/gobuffalo/mw-i18n (from $GOROOT) /home/seraph/go/src/github.com/gobuffalo/mw-i18n (from $GOPATH)

Would be useful if the error message suggested how to fix/install the package. npm does this kind of thing, when its missing a package the error will give you the most likely command to install it.

0xVavaldi commented 5 years ago

Identical issue following the same guide.

hubyhuby commented 5 years ago

Same thing for me on a fresh install. Buffalo go gets all the packages but seems to forget mw-i18n. A simple go get will solve the problem.

When doing buffalo dev Cannot find package "github.com/gobuffalo/mw-i18n" in any of: /usr/lib/go-1.12/src/github.com/gobuffalo/mw-i18n (from $GOROOT) /home/BOB/Documents/projects/src/github.com/gobuffalo/mw-i18n (from $GOPATH) buffalo: 2019/04/07 16:36:35 === Error! === buffalo: 2019/04/07 16:36:35 === exit status 1 actions/app.go:14:3: cannot find package "github.com/gobuffalo/mw-i18n" in any of: /usr/lib/go-1.12/src/github.com/gobuffalo/mw-i18n (from $GOROOT) /home/BOB/Documents/projects/src/github.com/gobuffalo/mw-i18n (from $GOPATH)

imander commented 5 years ago

I had the same issue. I installed with dep so I just ran dep ensure in the app directory and the problem was fixed

itsdarrylnorris commented 5 years ago

@imander , dep ensure requires to have Gopkg.toml in the root directory, it looks like the new installation does not have.

I was able to fix this issue by just running go get github.com/gobuffalo/mw-i18n. This will download the missing package, and everything seems to be working after that.