artillery
artillery copied to clipboard
【bug】 $(npm bin)/artillery dino failed
Version info:
2.0.0-14
Running this command:
$(npm bin)/artillery dino failed
I expected to see this happen:
Instead, this happened:
explanation: lib/console-reporter.js accidentally has optional chaining operator, which can not be understood by node.
Files being used:
<relevant yaml/js/csv go here>
hi @magentaqin 👋
Artillery depends on Node.js v14 or higher. I'm guessing you're running an older version of Node which does not support optional chaining.
https://github.com/artilleryio/artillery/blob/master/package.json#L7
Thanks. After I upgrade my node version, it works!
@hassy probably introducing a build system would allow for compiling to an older target so for example, the optional chaining would be transformed to use if statements and this sort of stuff and then It would support much older Node.js versions cause currently the workflow isn't the best for distributing, the problem is that the code you write is exactly the same code that gets shipped to users which can be better by introducing Babel:
- It would compile for older targets.
- It would compile to smaller bundles.
Supporting older Node.js versions isn't really something we want to do. We try to match current LTS or latest AWS Lambda runtime version, whichever is newer.
A smaller release bundle could be interesting if it significantly reduces package size or CLI start time for example.
Supporting older Node.js versions isn't really something we want to do
Yes you're completely right, we're now in Node.js 18! People using super older versions should have a problem.
A smaller release bundle could be interesting if it significantly reduces package size or CLI start time for example.
I think it can significantly reduce package size but not the CLI start time, cause It just transforms variable names to be shorter, removes unnecessary spaces, line breaks, comments, ..etc. basically cleans up everything that won't affect node's runtime.
Runtime compatible code is unavoidable which could pump up the size. A waring "Please upgrade to higher node version" instead of an error would be more friendly to users. I will pull a request to optimize it.
@magentaqin I agree 💯