# What can i do if i import a package that indirectly requires a different version of a package that nakama runtime uses?

**URL:** https://forum.heroiclabs.com/t/what-can-i-do-if-i-import-a-package-that-indirectly-requires-a-different-version-of-a-package-that-nakama-runtime-uses/3302
**Category:** Runtime Framework
**Tags:** server-framework
**Created:** [November 29, 2022, 7:33pm UTC](https://forum.heroiclabs.com/t/what-can-i-do-if-i-import-a-package-that-indirectly-requires-a-different-version-of-a-package-that-nakama-runtime-uses/3302 "2022-11-29T19:33:29Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![technicallyty](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.heroiclabs.com/technicallyty/32/1435_2.png) [@technicallyty](https://forum.heroiclabs.com/u/technicallyty)
#### Post date: [November 29, 2022, 7:33pm UTC](https://forum.heroiclabs.com/t/what-can-i-do-if-i-import-a-package-that-indirectly-requires-a-different-version-of-a-package-that-nakama-runtime-uses/3302/1 "2022-11-29T19:33:29Z")

</div>

Using Golang to build a plugin for the Nakama runtime server. I was importing a few different packages (namely spf13/viper), however, the import required a different version of the same package that the runtime server uses, resulting in dependency pinning issues.

more specifically, importing `github.com/spf13/viper` indirectly imports `golang.org/x/sys v0.1.0`. However, nakama v1.25.0 requires `golang.org/x/sys v0.0.0-20220610221304-9f5ed59c137d`.

I tried changing the `x/sys` import to be `v0.0.0-20220610221304-9f5ed59c137d`, however running `go mod tidy` reverts it back to the version that viper wants, `v.0.1.0`.

In this case, am i just unable to use the viper package? Is there anything i can do to still be able to use viper, or any other package that has the same dependencies as nakama?

1. Versions: Nakama 3.14.0, Docker, nakama-common v1.25.0
2. Server Framework Runtime language (If relevant) Go 1.19

error when using viper:

```auto
{"level":"fatal","ts":"2022-11-29T19:17:58.720Z","caller":"main.go:158","msg":"Failed initializing runtime modules","error":"plugin.Open(\"/nakama/data/modules/backend\"): plugin was built with a different version of package golang.org/x/sys/internal/unsafeheader"}

```

---

<div class="post-metadata">

### Author: ![sesposito](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.heroiclabs.com/sesposito/32/2594_2.png) [@sesposito](https://forum.heroiclabs.com/u/sesposito)
#### Post date: [November 30, 2022, 11:33am UTC](https://forum.heroiclabs.com/t/what-can-i-do-if-i-import-a-package-that-indirectly-requires-a-different-version-of-a-package-that-nakama-runtime-uses/3302/2 "2022-11-30T11:33:24Z")

</div>

Hello @technicallyty, have you tried following the steps in our [dependency pinning guide](https://heroiclabs.com/docs/nakama/server-framework/go-runtime/go-dependencies/)?

---

<div class="post-metadata">

### Author: ![technicallyty](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.heroiclabs.com/technicallyty/32/1435_2.png) [@technicallyty](https://forum.heroiclabs.com/u/technicallyty)
#### Post date: [November 30, 2022, 8:24pm UTC](https://forum.heroiclabs.com/t/what-can-i-do-if-i-import-a-package-that-indirectly-requires-a-different-version-of-a-package-that-nakama-runtime-uses/3302/3 "2022-11-30T20:24:31Z")

</div>

yes. in my case, the version is reverted when i run `go mod tidy`.

---

<div class="post-metadata">

### Author: ![sesposito](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.heroiclabs.com/sesposito/32/2594_2.png) [@sesposito](https://forum.heroiclabs.com/u/sesposito)
#### Post date: [December 5, 2022, 10:33am UTC](https://forum.heroiclabs.com/t/what-can-i-do-if-i-import-a-package-that-indirectly-requires-a-different-version-of-a-package-that-nakama-runtime-uses/3302/4 "2022-12-05T10:33:37Z")

</div>

I this case I’m afraid you’ll have to downgrade the `viper` package to `github.com/spf13/viper v1.3.2` which should be compatible with the sys package Nakama v3.14.0 transient dependencies require.
