FISCO-BCOS / go-sdk

golang SDK of FISCO BCOS
Apache License 2.0
73 stars 58 forks source link

go mod tidy时出现了模糊导入的问题 #151

Open ltmhaha opened 2 years ago

ltmhaha commented 2 years ago

go1.16.9 darwin/amd64

报错如下: imports github.com/FISCO-BCOS/go-sdk/abi 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.21.0-beta (/Users/coyee/go/pkg/mod/github.com/btcsuite/btcd@v0.21.0-beta/chaincfg/chainhash) github.com/btcsuite/btcd/chaincfg/chainhash v1.0.1 (/Users/coyee/go/pkg/mod/github.com/btcsuite/btcd/chaincfg/chainhash@v1.0.1)

之前使用旧版本sdk时未出现过,请问是我本地环境有问题吗?这个问题怎么解决?

bxq2011hust commented 2 years ago

看起来是你本地的包冲突了,我测试了下没出现,能提供重现的方法吗

roc0723 commented 2 years ago

我是用go17的版本的,然后 执行的go mod tidy -e -go="1.17" , 虽然还是报这个错,但是go.mod 和go.sum已经成功生成了,可以正常使用