Skip to content
This repository was archived by the owner on Jun 5, 2026. It is now read-only.
This repository was archived by the owner on Jun 5, 2026. It is now read-only.

The moduleSpecifier couldn't be found on local disk. #11

Description

@sampad-cchs

I am trying to run a test where one file is import into another file. Here K6 is throwing below error.
"The moduleSpecifier "./test.js" couldn't be found on local disk. Make sure that you've specified the right path to the file. If you're running k6 using the Docker image make sure you have mounted the local directory (-v /local/path/:/inside/docker/path) containing your script and modules so that they're accessible by k6 from inside of the container, see https://k6.io/docs/using-k6/modules#using-local-modules-with-docker.\n\tat go.k6.io/k6/js.(*InitContext).Require-fm (native)\n\tat file:///github/workspace/api_performance/tests/Production/Test_Get_Calls.js:3:0(31)\n\tat go.k6.io/k6/js.(*InitContext).Require-fm (native)\n\tat file:///github/workspace/api_performance/start.js:1:0(51)\n\tat native\n" hint="script exception"
I am using github runner to run this tests. Here is the yml file:
name: Load Tests

on: push

jobs:
build:
runs-on: ubuntu-latest

steps:
  - name: Checkout
    uses: actions/checkout@v1

  - name: Find Path
    run: |
      echo "$PWD" 

  - name: Find files
    run: |
      ls -al

  - name: Run local k6 test
    uses: grafana/k6-action@v0.2.0
    with:
      filename: ./api_performance/start.js
      flags: -e environment=qa

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions