Issue Loading Local Modules when using `k6 cloud run --local-execution`

I have created a series of K6 test that are working fine when I run them with k6 run MY_TEST.js, and these test are importing a couple local modules including one named config.js

But when I try to run the same test with k6 cloud run MY_TEST.js --local-execution I am getting:

error="GoError: the module \"./config.js\" was not previously resolved during initialization (__VU==0)\n"

I am unclear if there is something I am missing here or if this is running in some other directory when you use cloud run but my assumption would be the local execution flag would make it so it should run in the exact some way as k6 run would.

Not sure if it matters but I am running this on windows and any help would be appreciated.

1 Like

have the same issue, have you managed tro solve it ?

This looks like a potential bug.

Could you please report this in the k6 repository’s issues? That would be much appreciated, and easier for us to keep track of :man_bowing:

Hi @mareksiebert,

We’ve fixed that issue on Clone Bundle's URLs into lib.Archive by joanlopez · Pull Request #4532 · grafana/k6 · GitHub.

So, now it should be working on master, and the fix will be present in the next release, scheduled for the next couple of working days, which will be v0.57.0.

Meanwhile, we’re trying to understand whether this other community thread is also related, and thus solved with the same fix, or whether ir requires a larger change.

Thanks! :bowing_man: