Skip to content

Ambiguous import #1937

Closed
Closed
@joshklop

Description

Hi! I'm importing github.com/ethereum/go-ethereum/core/types, which depends on btcd. When I run go mod tidy, I get the following error:

github.com/filecoin-project/bacalhau/pkg/storage/ethblock imports
	github.com/ethereum/go-ethereum/core/types imports
	github.com/ethereum/go-ethereum/crypto imports
	github.com/btcsuite/btcd/btcec/v2/ecdsa tested by
	github.com/btcsuite/btcd/btcec/v2/ecdsa.test imports
	github.com/btcsuite/btcd/chaincfg/chainhash: ambiguous import: found package github.com/btcsuite/btcd/chaincfg/chainhash in multiple modules:
	github.com/btcsuite/btcd v0.22.0-beta (/home/user/.go/pkg/mod/github.com/btcsuite/[email protected]/chaincfg/chainhash)
	github.com/btcsuite/btcd/chaincfg/chainhash v1.0.1 (/home/user/.go/pkg/mod/github.com/btcsuite/btcd/chaincfg/[email protected])

Even after reading through a number of issues (#1839, here, here), I have been unable to resolve the issue.

I am on the latest version of go-ethereum. If I create a nearly empty go module and import the github.com/ethereum/go-ethereum/core/types package, I do not get this issue. Any suggestions/pointers would be much appreciated.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions