Build Loki locally for isolated environment

Hi, I am trying to deploy loki in an isolated environment and for that I need to build loki before doing so (vm based environment), because the regular build file is using files from git so I can’t run it. I am trying to follow the documentation to build but it always give me the same error:

pkg/storage/stores/shipper/compactor/retention/marker.go:7:2: cannot find package "." in: /root/go/src/github.com/grafana/loki/vendor/io/fs 

What to do? I have followed:

and both gave me the same error.

Hi @dror1212

What version of Go are you using?

Hi,
I am using version 1.14

I believe io/fs was only introduced in 1.16; try using that version and it should build successfully.

Forgot to answer, but thanks! seems like you were right

1 Like

No prob, please mark the question as solved :+1:
Glad you came right.