Error when trying to use go client with `dep`

I keep seeing this error when trying to build a package that manages dependencies using dep:

➜  artemis git:(dgraph) ✗ go build
# rsi/artemis/vendor/
vendor/ undefined: badger.KV

What is the issue here? I only added "" to my imports, and ran dep ensure before running go build, and this works for all other packages I’ve installed so far

Hi @felipellrocha,

This is happening because v8.3.0 of dgraph (which is looks like you’re using?) is not compatible with master of badger.

You should use a constraint in your Gopkg.toml file to lock badger to version 0.8 (the version of badger that was used in dgraph v0.8.3).

How do I do that? Like this?

  name = ""
  version = "=0.8.3"

  name = ""
  version = "=v0.8.0"

Solved this by adding: required = [""] to my Gopkg.toml file

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.