You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm running my test locally after building and it works fine:
k6 run dist/test.js
However, when deploying onto a remote VM:
/\ |‾‾| /‾‾/ /‾‾/
/\ / \ | |/ / / /
/ \/ \ | ( / ‾‾\
/ \ | |\ \ | (‾) |
/ __________ \ |__| \__\ \_____/ .io
WARN[0000] The moduleSpecifier "dist/test.js" has no scheme but we will try to resolve it as remote module. This will be deprecated in the future and all remote modules will need to explicitly use "https" as scheme.
ERRO[0000] The moduleSpecifier "dist/test.js" couldn't be found on local disk. Make sure that you've specified the right path to the file. If you're running k6 using the Docker image make sure you have mounted the local directory (-v /local/path/:/inside/docker/path) containing your script and modules so that they're accessible by k6 from inside of the container, see https://k6.io/docs/using-k6/modules#using-local-modules-with-docker. Additionally it was tried to be loaded as remote module by prepending "https://" to it, which also didn't work. Remote resolution error: "Get "https://dist/est.js": dial tcp: lookup dist: Temporary failure in name resolution"
I'm not using Docker and I have all dependencies required (node, npm, Go).
What's going on here?
k6 version
k6 v0.43.1
OS
go1.19.6/ubuntu latest
Docker version and image (if applicable)
n/a
Steps to reproduce the problem
Run test
Expected behaviour
Test runs and doesn't treat module as remote module
Actual behaviour
Module is treated as remote, says file can't be found and fails test
The text was updated successfully, but these errors were encountered:
Hi @Schachte, the error message is a bit derranged as for UX reasons we try a bunch of things and some of the messages try to tease out what is wrong.
But the problem is 100% that the file isn't there. If you run it with ./ infront k6 will stop tryign the other stuff and will not try to load it remotely. But before that it still tries to load it locally.
So the problem is that the file isn't where you think it is. Maybe you are running k6 in a different directory then what you think.
I don't think that's true as the file is definitely there and putting relative path, ./ doesn't resolve the issue. The only resolution is running this in Docker and nothing else. That's fine, but the overhead of needing the container is a bit cumbersome.
@Schachte if even adding ./ doesn't fix it - I am pretty certain that the file isn't there or the k6 process can't access/see it.
Like ... I can't figure out how one k6 process can find the file with this path if it exists, but another won't, except for the file isn't there for one of the processes.
I would recommend using ls or similar to print the contents of the directories around it before running k6.
Maybe even double checking where you run the command from.
Brief summary
I'm running my test locally after building and it works fine:
However, when deploying onto a remote VM:
I'm not using Docker and I have all dependencies required (node, npm, Go).
What's going on here?
k6 version
k6 v0.43.1
OS
go1.19.6/ubuntu latest
Docker version and image (if applicable)
n/a
Steps to reproduce the problem
Run test
Expected behaviour
Test runs and doesn't treat module as remote module
Actual behaviour
Module is treated as remote, says file can't be found and fails test
The text was updated successfully, but these errors were encountered: