Skip to content
This repository has been archived by the owner on Dec 8, 2023. It is now read-only.

k6 0.45.1 issue on build #34

Closed
Laurianti opened this issue Aug 5, 2023 · 2 comments
Closed

k6 0.45.1 issue on build #34

Laurianti opened this issue Aug 5, 2023 · 2 comments

Comments

@Laurianti
Copy link

From 0.45.0 to 0.45.1 I have this issue:

2023/08/05 14:01:15 [INFO] Build environment ready
2023/08/05 14:01:15 [INFO] Building k6
2023/08/05 14:01:15 [INFO] exec (timeout=0s): /usr/local/go/bin/go mod tidy -compat=1.17
2023/08/05 14:01:15 [INFO] exec (timeout=0s): /usr/local/go/bin/go build -o /go/k6 -ldflags=-w -s -trimpath
# go.k6.io/k6/js/modules
/go/pkg/mod/go.k6.io/[email protected]/js/modules/resolution.go:161:20: source.URL.JoinPath undefined (type *url.URL has no field or method JoinPath)
note: module requires Go 1.19
2023/08/05 14:01:54 [INFO] Cleaning up temporary folder: /tmp/buildenv_2023-08-05-1400.2697366931
2023/08/05 14:01:54 [FATAL] exit status 2
The command '/bin/sh -c xk6 build --with github.com/grafana/xk6-amqp@latest' returned a non-zero code: 1
@mstoykov
Copy link
Contributor

mstoykov commented Aug 6, 2023

@Laurianti this error seems to indicate you are compiling with a version of go that is below 1.19.

The code referenced there wasn't update inv v0.45.1 - it was added for v0.45.0.

There is good chance that you never compiled with v0.45.0 as the update to it was tagged the day before the update to v0.45.1 was made.

Can you confirm your go version by running go version ?

@Laurianti
Copy link
Author

You are right, I had Go version 1.18 installed, and that was indeed the issue. After updating to Go 1.19, the compilation worked correctly. Thank you!

@mstoykov mstoykov closed this as completed Aug 6, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants