Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error parsing the go.mod #2

Closed
knechtionscoding opened this issue Aug 23, 2021 · 0 comments
Closed

Error parsing the go.mod #2

knechtionscoding opened this issue Aug 23, 2021 · 0 comments

Comments

@knechtionscoding
Copy link

When following install instructions:

hans.knecht:k6-runner/ (master✗) $ go install github.com/k6io/xk6/cmd/xk6@latest                                                                                                                                                                                                 

go: downloading github.com/k6io/xk6 v0.4.2
go: downloading github.com/Masterminds/semver/v3 v3.1.0

hans.knecht:k6-runner/ (master✗) $ xk6 build --with github.com/szkiba/xk6-prometheus@latest                                                                                                                                                                                      

2021/08/23 13:16:29 [INFO] Temporary folder: /Users/hans.knecht/Documents/Repositories/universe/infra/k6-runner/buildenv_2021-08-23-1316.046709920
2021/08/23 13:16:29 [INFO] Writing main module: /Users/hans.knecht/Documents/Repositories/universe/infra/k6-runner/buildenv_2021-08-23-1316.046709920/main.go
2021/08/23 13:16:29 [INFO] Initializing Go module
2021/08/23 13:16:29 [INFO] exec (timeout=10s): /usr/local/Cellar/go/1.16.5/libexec/bin/go mod init k6 
go: creating new go.mod: module k6
go: to add module requirements and sums:
        go mod tidy
2021/08/23 13:16:29 [INFO] Pinning versions
2021/08/23 13:16:29 [INFO] exec (timeout=0s): /usr/local/Cellar/go/1.16.5/libexec/bin/go mod edit -require go.k6.io/k6@latest 
2021/08/23 13:16:29 [INFO] exec (timeout=0s): /usr/local/Cellar/go/1.16.5/libexec/bin/go mod edit -require github.com/szkiba/xk6-prometheus@latest 
go: errors parsing go.mod:
/Users/hans.knecht/Documents/Repositories/universe/infra/k6-runner/buildenv_2021-08-23-1316.046709920/go.mod:5: require go.k6.io/k6: version "latest" invalid: must be of the form v1.2.3
2021/08/23 13:16:29 [INFO] Cleaning up temporary folder: /Users/hans.knecht/Documents/Repositories/universe/infra/k6-runner/buildenv_2021-08-23-1316.046709920
2021/08/23 13:16:29 [FATAL] exit status 1

This can be replicated with a minimalist dockerfile:

# Build the k6 binary with the extension
FROM golang:1.16.4-buster as builder

RUN go install github.com/k6io/xk6/cmd/xk6@latest
RUN xk6 build --output /k6 --with github.com/szkiba/xk6-prometheus@latest

I've also tried increasing the golang version to 1.16.7 (latest stable in that minor version). without and change.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant