gizak / termui

Golang terminal dashboard
MIT License
13.06k stars 783 forks source link

cannot find module providing package github.com/gizak/termui/v3/widgets #238

Closed richstokes closed 5 years ago

richstokes commented 5 years ago

Trying to run the hello world code, with the go.mod file in place I get:

go run termui.go 
go: finding github.com/mattn/go-runewidth v0.0.2
go: finding github.com/mitchellh/go-wordwrap v0.0.0-20150314170334-ad45545899c7
go: finding github.com/cjbassi/drawille-go v0.0.0-20190126131713-27dc511fe6fd
go: finding github.com/nsf/termbox-go v0.0.0-20190121233118-02980233997d
go: finding golang.org/x/arch v0.0.0-20181203225421-5a4828bb7045
go: finding github.com/gizak/termui/v3/widgets latest
go: finding github.com/gizak/termui v2.3.0+incompatible
go: downloading github.com/gizak/termui v2.3.0+incompatible
go: extracting github.com/gizak/termui v2.3.0+incompatible
build github.com/gizak/termui/v3: cannot load github.com/gizak/termui/v3/widgets: cannot find module providing package github.com/gizak/termui/v3/widgets
go version
go version go1.12.5 darwin/amd64

Probably missing something silly, but I'm not sure where to start. Any suggestions welcome.

cjbassi commented 5 years ago

Huh, for some reason it looks like it's downloading termui v2.3 instead of v3. Not sure why that would be. Maybe explicitly downloading the latest version would work. Btw, are you working outside of the $GOPATH?

tpberntsen commented 5 years ago

I'm experiencing a similar problem when running dep ensure -add github.com/gizak/termui:

Solving failure: No versions of github.com/gizak/termui met constraints:
        v3.0.0: Could not introduce github.com/gizak/termui@v3.0.0 due to multiple problematic subpackages:
        Subpackage github.com/gizak/termui/v3 is missing. (Package is required by (root).)      Subpackage github.com/gizak/termui/v3/widgets is missing. (Package is required by (root).)
tetrahedronix commented 5 years ago

It seems to me that version 3 is still a private repository and cannot be downloaded. Same problem here.

Update: since I'm using go-1.10 I've made the symlinks from termui to termiui /v3 and now th Go compiler can find the package and runs the termui properly. I hope it can help you.

nektro commented 5 years ago

https://github.com/gizak/termui/tree/v3 hasn't been tagged yet

cjbassi commented 5 years ago

Should be working now, let me know if you still get errors. I forgot that Go modules requires having a v3 branch or v3 subdirectory, and I went with the subdirectory.