Open acarioni opened 2 weeks ago
Seems to be a shell error: https://stackoverflow.com/questions/36725864/syntax-error-word-unexpected-expecting
The haxelib.sh is generated by npm, so I would have to guess there is some mismatch between your default shell and your npm version.
Your error is rather peculiar, since running lix and haxe seems to not have produced that error. If I had to guess, I would conclude that you invoked them from another shell (i.e. not the default shell on your OS) and then when haxe tries to invoke haxelib.sh, it uses the default OS shell, which cannot properly process the script, probably due to one of the reasons mentioned in the stackoverflow post.
This is very strange, as I used the bash shell for everything on a fresh virtual machine.
Hmm. Does invoking haxelib
directly produce the error?
Yes, it produces /home/ubuntu/haxe/versions/4.3.4/haxelib: 1: Syntax error: word unexpected (expecting ")")
Hmm. And haxe
doesn't? Can you check the both scripts to see if there's any difference?
Haxe is producing the same error.
To summarize:
$ haxe
haxelib path: /home/ubuntu/haxe/versions/4.3.4/haxelib: 1: Syntax error: word unexpected (expecting ")")
$ haxelib
/home/ubuntu/haxe/versions/4.3.4/haxelib: 1: Syntax error: word unexpected (expecting ")")
Well, yes and no. Haxe is calling haxelib (no idea why, really, but that's another matter) and that then produces the error. But the haxe
script itself seems to parse (and run) fine. Can you spot any obvious difference between it and the haxelib script?
I have installed Haxe 4.3.4 using Lix 15.12.0 on Ubuntu 22.04. However, when I attempt to run Haxe, I encounter the following error:
No error occurs when I install Haxe with apt-get.