Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't build tutorial from the website #730

Closed
arjanvaneersel opened this issue Oct 5, 2019 · 1 comment · Fixed by #731
Closed

Can't build tutorial from the website #730

arjanvaneersel opened this issue Oct 5, 2019 · 1 comment · Fixed by #731
Labels
kind/bug A bug in existing code (including security flaws)

Comments

@arjanvaneersel
Copy link

I'm at the very first step of the website's tutorial and end up getting an error when trying to build:

# github.com/libp2p/go-libp2p/p2p/host/basic
../../../../pkg/mod/github.com/libp2p/go-libp2p@v6.0.23+incompatible/p2p/host/basic/basic_host.go:131:32: cannot use h (type *BasicHost) as type host.Host in argument to identify.NewIDService:
        *BasicHost does not implement host.Host (missing EventBus method)
../../../../pkg/mod/github.com/libp2p/go-libp2p@v6.0.23+incompatible/p2p/host/basic/basic_host.go:158:32: cannot use h (type *BasicHost) as type host.Host in argument to ping.NewPingService:
        *BasicHost does not implement host.Host (missing EventBus method)
../../../../pkg/mod/github.com/libp2p/go-libp2p@v6.0.23+incompatible/p2p/host/basic/basic_host.go:512:28: h.natmgr.NAT().ExternalAddrs undefined (type *"github.com/libp2p/go-libp2p-nat".NAT has no field or method ExternalAddrs)
../../../../pkg/mod/github.com/libp2p/go-libp2p@v6.0.23+incompatible/p2p/host/basic/natmgr.go:94:8: assignment mismatch: 1 variable but "github.com/libp2p/go-libp2p-nat".DiscoverNAT returns 2 values
../../../../pkg/mod/github.com/libp2p/go-libp2p@v6.0.23+incompatible/p2p/host/basic/natmgr.go:94:26: not enough arguments in call to "github.com/libp2p/go-libp2p-nat".DiscoverNAT
        have ()
        want (context.Context)
../../../../pkg/mod/github.com/libp2p/go-libp2p@v6.0.23+incompatible/p2p/host/basic/natmgr.go:154:13: mapping.InternalAddr undefined (type "github.com/libp2p/go-libp2p-nat".Mapping has no field or method InternalAddr)
../../../../pkg/mod/github.com/libp2p/go-libp2p@v6.0.23+incompatible/p2p/host/basic/natmgr.go:176:26: not enough arguments in call to nat.NewMapping
        have (multiaddr.Multiaddr)
        want (string, int)
../../../../pkg/mod/github.com/libp2p/go-libp2p@v6.0.23+incompatible/p2p/host/basic/natmgr.go:206:13: mapping.InternalAddr undefined (type "github.com/libp2p/go-libp2p-nat".Mapping has no field or method InternalAddr)

I'm using go 1.13.

@arjanvaneersel arjanvaneersel added the kind/bug A bug in existing code (including security flaws) label Oct 5, 2019
@arjanvaneersel arjanvaneersel changed the title Can't run tutorial from the website Can't build tutorial from the website Oct 5, 2019
@raulk
Copy link
Member

raulk commented Oct 6, 2019

Hello! This is due to go 1.13 defaulting to proxy all module requests via proxy.golang.org. Unfortunately the proxy serves old +incompatible versions of go-libp2p, and the go toolchain selects those over the succeeding versions that are compatible with Go Modules.

Could you try the updated instructions in this PR? #731. Delete all require directives from your go.mod before attempting this, to start from scratch.

@raulk raulk closed this as completed in #731 Oct 6, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug A bug in existing code (including security flaws)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants