TypeError: Cannot read property 'id' of undefined
kk2491 opened this issue · 2 comments
kk2491 commented
Hi,
First of all thanks for this wonderful tool. It really helps in testing the APIs quickly.
Ubuntu version : 22.04
Node version : v14.21.3
I have installed the loadtest
gloabally. When I try to execute a query, I ran into the below error.
kishor@kishor-sys:~$ loadtest -n 10 -c 5 http://localhost:13000/endpoint1
file:///usr/lib/node_modules/loadtest/lib/cluster.js:20
const result = await task(cluster.worker.id) || '0'
^
TypeError: Cannot read property 'id' of undefined
at runTask (file:///usr/lib/node_modules/loadtest/lib/cluster.js:20:44)
at processAndRun (file:///usr/lib/node_modules/loadtest/bin/loadtest.js:60:24)
at file:///usr/lib/node_modules/loadtest/bin/loadtest.js:111:7
at <anonymous> (<anonymous>)
kishor@kishor-sys:~$
Is there anything I am missing here?
Thank you,
KK
kk2491 commented
Hi,
I got this fixed, kindly ignore the issue created.
I just noticed the compatibility matrix with respect to node version. Based on that I installed the 5.0.1 version, now it works like a charm.
Thanks for the wonderful tool.
Thank you,
KK
alexfernandez commented
Great, thanks for the update!