Hi there,
Whenever I try to import:
import { randomItem } from 'https://jslib.k6.io/k6-utils/1.4.0/index.js';
It throws the error:
./k6 -v run --vus 1 --duration 2s mytest.bundle.js
DEBU[0000] Logger format: TEXT
DEBU[0000] k6 version: v0.32.0 ((devel), go1.19.2, darwin/arm64)
/\ |‾‾| /‾‾/ /‾‾/
/\ / \ | |/ / / /
/ \/ \ | ( / ‾‾\
/ \ | |\ \ | (‾) |
/ __________ \ |__| \__\ \_____/ .io
DEBU[0000] Initializing the runner...
DEBU[0000] Loading... moduleSpecifier="file:///...mytest.bundle.js" originalModuleSpecifier=mytest.bundle.js
DEBU[0000] Babel: Transformed t=472.828709ms
DEBU[0000] Loading... moduleSpecifier="https://jslib.k6.io/expect/0.0.4/index.js" originalModuleSpecifier="https://jslib.k6.io/expect/0.0.4/index.js"
DEBU[0000] Fetching source... url="https://jslib.k6.io/expect/0.0.4/index.js?_k6=1"
DEBU[0000] Fetched! len=7247 t=199.622416ms url="https://jslib.k6.io/expect/0.0.4/index.js?_k6=1"
DEBU[0001] Babel: Transformed t=552.074208ms
DEBU[0001] Loading... moduleSpecifier="https://jslib.k6.io/ajv/6.12.5/index.js" originalModuleSpecifier="https://jslib.k6.io/ajv/6.12.5/index.js"
DEBU[0001] Fetching source... url="https://jslib.k6.io/ajv/6.12.5/index.js?_k6=1"
DEBU[0001] Fetched! len=121974 t=81.160916ms url="https://jslib.k6.io/ajv/6.12.5/index.js?_k6=1"
DEBU[0001] Loading... moduleSpecifier="https://jslib.k6.io/k6-utils/1.4.0/index.js" originalModuleSpecifier="https://jslib.k6.io/k6-utils/1.4.0/index.js"
DEBU[0001] Fetching source... url="https://jslib.k6.io/k6-utils/1.4.0/index.js?_k6=1"
DEBU[0001] Fetched! len=4974 t=72.975792ms url="https://jslib.k6.io/k6-utils/1.4.0/index.js?_k6=1"
DEBU[0001] Babel: Transformed t=298.388916ms
ERRO[0001] GoError: unknown module: k6/execution
at reflect.methodValueCall (native)
at https://jslib.k6.io/k6-utils/1.4.0/index.js:2:1221(77)
at https://jslib.k6.io/k6-utils/1.4.0/index.js:2:6148(3)
at reflect.methodValueCall (native)
at file:///.....mytest.bundle.js:497:53(172)
at file:///....mytest.bundle.js:525:5(35)
at file:///....mytest.bundle.js:530:13(2) hint="script exception"
error: Recipe `test` failed on line 16 with exit code 107
It would be really great if I can get a fix for this!
P.S.: I have removed the full directory path with ....mytest.bundle.js
Edit: I have tried to uninstall and reinstall go
and k6
but the still same issue is occurring.