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?
Yusuf
2
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
I started to learn K6, and had the same problem, when you run the xk6, it will generate a new version of K6, and you will need replace the old.
Your solution have intelisense in visual studio code? Because I put your solution and not workded
rdt.one
6
Any reason why you expect intellisense to make a difference?
Can you provide more details?