Hi,
I have created a simple utility file called utility.js. I have tried the following two ways to import the file:
import * as utility from './utility.js';
import { hello } from './utility.js';
the content of the file is :
function hello () {
console.log(`Hello`)
}
I call this from the setup function of the main script:
export function setup() {
hello();
}
I keep getting the following response:
TypeError: Value is not an object: undefined at file:///D:/k6/bdds/main.js:75:4(4).
So it seems that the function is never imported and hello() is undefined. What am i doing wrong here?