Hey there :). I’m hardly leaving my Haxe-lab now-a-days, stuck on an early 4 version and too focused on my huge Haxe project to read the news. But I did update my NodeJS and this seems to have caused an update in how “npx haxe” runs. I think when running haxe via npx, a different, newer version of the compiler is used?
First, my --library flags in build.hxml stopped working. Ok, I changed to -lib and it worked.
But then this code doesn’t compile anymore:
SetTimeout.call(() ->
{
bootstrap();
}, _delayForDebugging ? 2000 : 2);
It complains at the (), saying 'Unexpected )
Just by trial & error & some hunches, I replaced → with => and I put a “none” argument in the parenthesis and it moved on, only to fail at:
app.get(‘/choice/:choiceID’, (req, res, next) => {
Where it says “unexpected ,”
This, I can’t get rid of (even after replacing → with =>
Weird thing is that my code STILL COMPILES using a different launch method, which uses npx task
, which runs “haxe build.hxml”, which, I presume, uses my older Haxe compiler.
It only fails when launching via VS Code debug, whose terminal dies saying:
The terminal process “C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -Command npx haxe build.hxml” terminated with exit code: 1.
Any ideas?