Panic: extension already registered: k6/x/nats


I have forked this x/nats extension and i have been able to build it, but when i run the test with the new binary i keep getting this panic. Full trace below:

$ ./k6.exe run workloads/nats.js
panic: extension already registered: k6/x/nats

I am stuck at this part i have tried to find how to change the register with no luck. Anyone that had similar issue?


Sorry i cannot put a link to my repo as this is my first post …

i cannot copy the trace as it takes it as links and i am only allowed to put 2 links …

the repo is in github mrsdaehin as xk6-nats -.-

Hi @Avivanco!

I was able to clone your repository and was able to build and run the test/test.js script successfully on a Mac.

Do you have work on your local branch that is not in the public repository? I definitely don’t see the workloads/nats.js script you are running in the example. Also, the repository version is building with k6 v0.37.0 rather than v0.45.0 (as shown by your stacktrace).

Let me know if there’s anything else I can try for you.


1 Like

We have ran it in a clean machine and it is working properly!

Something was wrong when building the exe in my machine :confused:

Thanks a lot :slight_smile: