Getting error while running my first script

Dear Team,

I am getting below error while running my first script. Please check.

Content of Script:

import http from 'k6/http';
import { sleep } from 'k6';

export default function () {

Hi @SahooN

Welcome to the community forum :wave:

This is not related to k6. From the error lookup no such host it seems that your laptop/workstation/host cannot access

Is a curl -X GET from command line working for you? Once that works, I would expect the test to work. Maybe you go via a proxy or you are working in an airgapped environment?

I hope this helps.


The error message you provided suggests that there is an issue with the script you are trying to run. However, I cannot see the specific error details in the screenshot you shared.

Please make sure to check the following:

Verify that the required dependencies (in this case, k6/http and k6) are properly installed.
Ensure that the script file has the correct file extension, such as .js for JavaScript.
Double-check that the URL is accessible and valid.
If you encounter any specific error messages or issues, please provide more details so that I can assist you further.

Rachel Gomez

1 Like

Hi @eyeveebe,

I’m trying to migrate many of my tests from JMeter to k6 platform, so what could be the best way to migrate my existing test cases written in .jmx format to .js format so that they are compatible with k6 platform for load testing?

I have tried using jmeter-to-k6 tool, but getting stuck with a lot of warnings, errors and compatibility issues.

Hi @jvraviteja18

Find a follow up on the original topic Migrating from JMeter to k6. Kindly ask for help on those, as the comment you added to this topic is unrelated and can confuse future readers.