Issue while installing two extensions at once

I’m trying to install two extensions at once to run a test which contains both faker and kafka modules. But I’m receiving an error.

Command:

xk6 build v0.35.0 --with github.com/szkiba/xk6-faker --with github.com/mostafa/xk6-kafka

(tried to same with or 0.42.0. I get the same error)

Error

../../../go/pkg/mod/github.com/szkiba/xk6-faker@v0.2.0/faker.go:59:9: undefined: common.GetRuntime
../../../go/pkg/mod/github.com/szkiba/xk6-faker@v0.2.0/faker.go:63:9: undefined: common.GetRuntime
../../../go/pkg/mod/github.com/szkiba/xk6-faker@v0.2.0/module.go:51:8: undefined: common.GetRuntime
../../../go/pkg/mod/github.com/szkiba/xk6-faker@v0.2.0/module.go:55:9: undefined: common.Bind
2022/12/21 00:15:43 [INFO] Cleaning up temporary folder: /Users/jas/Projects/Kafka/xk6-kafka/buildenv_2022-12-21-0015.2063776580
2022/12/21 00:15:43 [FATAL] exit status 2

Any help much appreciated. Ta!

1 Like

Hey @jas,

xk6-faker is not updated recently, and there are some breaking changes in the extensions API of k6 and xk6, which is why the build fails.

2 Likes

Thanks for the clarification @mostafa :+1:t3:

2 Likes