sdgmf/go-project-sample

无法运行项目

AugusLarry opened this issue · 3 comments

$ make docker-compose
for app in 'products' 'details' 'ratings' 'reviews' ;
do
GOOS=linux GOARCH="amd64" go build -o dist/$app-linux-amd64 ./cmd/$app/;
GOOS=darwin GOARCH="amd64" go build -o dist/$app-darwin-amd64 ./cmd/$app/;
done
for app in 'products' 'details' 'ratings' 'reviews' ;
do
jsonnet -J ./grafana/grafonnet-lib -o ./scripts/grafana/dashboards/$app.json --ext-str app=$app ./scripts/grafana/dashboard.jsonnet ;
done
RUNTIME ERROR: couldn't open import "grafonnet/grafana.libsonnet": no match locally or in the Jsonnet library paths.
./scripts/grafana/dashboard.jsonnet:1:17-53 thunk
./scripts/grafana/dashboard.jsonnet:2:19-26 thunk
./scripts/grafana/dashboard.jsonnet:238:1-10
RUNTIME ERROR: couldn't open import "grafonnet/grafana.libsonnet": no match locally or in the Jsonnet library paths.
./scripts/grafana/dashboard.jsonnet:1:17-53 thunk
./scripts/grafana/dashboard.jsonnet:2:19-26 thunk
./scripts/grafana/dashboard.jsonnet:238:1-10
RUNTIME ERROR: couldn't open import "grafonnet/grafana.libsonnet": no match locally or in the Jsonnet library paths.
./scripts/grafana/dashboard.jsonnet:1:17-53 thunk
./scripts/grafana/dashboard.jsonnet:2:19-26 thunk
./scripts/grafana/dashboard.jsonnet:238:1-10
RUNTIME ERROR: couldn't open import "grafonnet/grafana.libsonnet": no match locally or in the Jsonnet library paths.
./scripts/grafana/dashboard.jsonnet:1:17-53 thunk
./scripts/grafana/dashboard.jsonnet:2:19-26 thunk
./scripts/grafana/dashboard.jsonnet:238:1-10
make: *** [dash] Error 1

不知是哪里不对?

sdgmf commented

检查scripts/grafana/grafonnet文件夹是否有内容,这是一个git子模块,可以通过下边命令拉取.
git submodule init
git submodule update

屏幕快照 2019-08-31 19 11 52

make docker-compose之前 已经运行过这个命令,当前该目录下没有grafonnet目录,只有grafonnet-lib目录
sdgmf commented

已经修复,谢谢反馈。