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

**URL:** <https://community.grafana.com/t/issue-loading-local-modules-when-using-k6-cloud-run-local-execution/136919>\
**Category:** Grafana k6\
**Created:** [November 22, 2024, 6:41pm UTC](https://community.grafana.com/t/issue-loading-local-modules-when-using-k6-cloud-run-local-execution/136919 "2024-11-22T18:41:37Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![hokie10](https://avatars.discourse-cdn.com/v4/letter/h/6bbea6/32.png) [@hokie10](https://community.grafana.com/u/hokie10)\
**Post date:** [November 22, 2024, 6:41pm UTC](https://community.grafana.com/t/issue-loading-local-modules-when-using-k6-cloud-run-local-execution/136919/1 "2024-11-22T18:41:37Z")

</div>

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:

```auto
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.

---

<div class="post-metadata">

**Author:** ![mareksiebert](https://avatars.discourse-cdn.com/v4/letter/m/f1d935/32.png) [@mareksiebert](https://community.grafana.com/u/mareksiebert)\
**Post date:** [December 3, 2024, 3:02pm UTC](https://community.grafana.com/t/issue-loading-local-modules-when-using-k6-cloud-run-local-execution/136919/3 "2024-12-03T15:02:41Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![oleiade](https://sea2.discourse-cdn.com/grafana/user_avatar/community.grafana.com/oleiade/32/35836_2.png) [@oleiade](https://community.grafana.com/u/oleiade)\
**Post date:** [December 3, 2024, 3:15pm UTC](https://community.grafana.com/t/issue-loading-local-modules-when-using-k6-cloud-run-local-execution/136919/4 "2024-12-03T15:15:37Z")

</div>

This looks like a potential bug.

Could you please report this in the [k6 repository’s issues](https://github.com/grafana/k6/issues)? That would be much appreciated, and easier for us to keep track of 🙇‍♂️

---

<div class="post-metadata">

**Author:** ![joanlopez](https://sea2.discourse-cdn.com/grafana/user_avatar/community.grafana.com/joanlopez/32/12328_2.png) [@joanlopez](https://community.grafana.com/u/joanlopez)\
**Post date:** [February 11, 2025, 10:32am UTC](https://community.grafana.com/t/issue-loading-local-modules-when-using-k6-cloud-run-local-execution/136919/5 "2025-02-11T10:32:08Z")

</div>

Hi @mareksiebert,

We’ve fixed that issue on [Clone Bundle's URLs into lib.Archive by joanlopez · Pull Request #4532 · grafana/k6 · GitHub](https://github.com/grafana/k6/pull/4532).

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](https://community.grafana.com/t/local-execution-fails-to-send-data-to-cloud-i-get-a-timeout-and-the-test-does-not-run/142904) is also related, and thus solved with the same fix, or whether ir requires a larger change.

Thanks! 🙇‍♂️
