Closed DanickBG closed 5 months ago
Please update your jsonnet
.
@Duologic I followed your advice and updated everything and installed again jsonnet via pip as well. Here is what I did:
dani@dani-Latitude-E5430:~$ go version
go version go1.22.2 linux/amd64
dani@dani-Latitude-E5430:~$ go install github.com/google/go-jsonnet/cmd/jsonnet@latest
go: downloading github.com/google/go-jsonnet v0.20.0
...
dani@dani-Latitude-E5430:~$ go install -a github.com/jsonnet-bundler/jsonnet-bundler/cmd/jb@latest
go: downloading github.com/jsonnet-bundler/jsonnet-bundler v0.5.1
...
dani@dani-Latitude-E5430:~$ mkdir mynewjsonnetproject
dani@dani-Latitude-E5430:~$ cd mynewjsonnetproject/
dani@dani-Latitude-E5430:~/mynewjsonnetproject$ jb init
dani@dani-Latitude-E5430:~/mynewjsonnetproject$ jb install github.com/grafana/grafonnet/gen/grafonnet-latest@main
GET https://github.com/grafana/grafonnet/archive/1c56af39815c4903e47c27194444456f005f65df.tar.gz 200
GET https://github.com/grafana/grafonnet/archive/1c56af39815c4903e47c27194444456f005f65df.tar.gz 200
GET https://github.com/jsonnet-libs/docsonnet/archive/6ac6c69685b8c29c54515448eaca583da2d88150.tar.gz 200
GET https://github.com/jsonnet-libs/xtd/archive/63d430b69a95741061c2f7fc9d84b1a778511d9c.tar.gz 200
dani@dani-Latitude-E5430:~/mynewjsonnetproject$ go install github.com/google/go-jsonnet/cmd/jsonnet@latest
dani@dani-Latitude-E5430:~/mynewjsonnetproject$ pip install jsonnet
...
Successfully installed jsonnet-0.20.0
I created a new folder and tried again there - I got the same error
Please, help me resolve this problem :)
@Duologic I updated and still get the same results, any other advice? I would really appreciate if you can help me so we can others who face the same problem in the future.
Not sure what is in the python bindings for Jsonnet. Does it also pull in Jsonnet itself? You will want to run go-jsonnet not default C jsonnet.
Unfortunately I can't understand what you mean @malcolmholmes :( I have no go-jsonnet command which I can run, only jsonnet, despite having downloaded everything as stated in Readme. If you tell me explicitly how to run go-jsonnet then I can try to do it :)
Run this command:
jsonnet -v
It should mention "Go implementation", as mine does:
Jsonnet commandline interpreter (Go implementation) v0.19.1
@malcolmholmes
Mine says:
Jsonnet commandline interpreter (Go implementation) v0.20.0
Oh my God... Finally resolved the error: The extention of the file used to be .jsonnet instead of .libsonnet Once I renamed the extention everything is working. Thank you guys @Duologic @malcolmholmes for the help you provided me!
I am testing the simples version of the custom variable:
However, it results in this error:
RUNTIME ERROR: field does not exist: get vendor/github.com/grafana/grafonnet/gen/grafonnet-v10.4.0/clean/../custom/./dashboard/variable.libsonnet:335:17-24 thunk <multi> vendor/github.com/grafana/grafonnet/gen/grafonnet-v10.4.0/clean/../custom/./dashboard/../util/./dashboard.libsonnet:27:14-19 object <anonymous> vendor/github.com/grafana/grafonnet/gen/grafonnet-v10.4.0/clean/../custom/./dashboard/variable.libsonnet:(333:15)-(336:16) object <anonymous> test.jsonnet:11:30-39 thunk <array_element> vendor/github.com/grafana/grafonnet/gen/grafonnet-v10.4.0/clean/dashboard.libsonnet:(210:48)-(212:60) object <anonymous> vendor/github.com/grafana/grafonnet/gen/grafonnet-v10.4.0/clean/dashboard.libsonnet:(210:24)-(212:65) object <anonymous> During manifestation