ERRO[0000] unknown module: k6/x/faker

Hi!
I’m using the xk6-faker (GitHub - szkiba/xk6-faker: A k6 extension for random fake data generation.) extension and when I run the test, I get the error message on the console:

 ERRO[0000] unknown module: k6/x/faker
        at go.k6.io/k6/js.(*InitContext).Require-fm (native)

Please, can anyone help me?

try below;

import Faker from 'https://cdnjs.cloudflare.com/ajax/libs/Faker/3.1.0/faker.min.js'

export default function(){
Faker.phone.phoneNumber()
}

or

import faker from 'https://cdnjs.cloudflare.com/ajax/libs/Faker/3.1.0/faker.min.js'

export default function(){
faker.phone.phoneNumber()
}
1 Like

Hi!!!
This import worked.

tks!!!

1 Like