Barrel not Letting Script Run

I’m trying to create a small test suite for where I work, in this it means there will be quite a lot of copy pasted code when it comes to things like user authorisation or checking responses. To cut down on this I want to barrel some functions but doing this just leads to this:

ERRO[0000] read C:\Users\XX\Desktop\loadTesting\src\buildingBlocks: The handle is invalid.
at reflect.methodValueCall (native)
at file:///C:/Users/XX/Desktop/loadTesting/src/testsJavascript/UserJourney.js:119:130(33) hint=“script exception”

This is what I’m trying to do in the script:

import http from “k6/http”;
import { check, group, sleep } from “k6”;
import { graphql } from “…/buildingBlocks”;

Any help would be massively appreciated.

Hi @LoughDew,

Welcome to the forum. There appears to be a JS exception somewhere in your module buildingBlocks that causes this error. Without seeing that module there isn’t much to say. But the error message here mentions the file and line where exception happened: UserJourney.js:119 – that should help locate the issue.

Interesting that that is where the issues is being thrown as this is the line

. Sorry if this is coming off as newb as that’s what I am.