@Robert said:
node /path/to/Kha/make --compile
undefined:3
let project = new Project('New Project');
^^^
SyntaxError: Block-scoped declarations (let, const, function, class) not yet supported outside strict mode
at Function (native)
at module.exports (/usr/share/haxe/kha/16,1,2/Tools/khamake/ProjectFile.js:10:16)
at exportKhaProject (/usr/share/haxe/kha/16,1,2/Tools/khamake/main.js:344:13)
at exportProject (/usr/share/haxe/kha/16,1,2/Tools/khamake/main.js:451:3)
at Object.exports.run.callback [as run] (/usr/share/haxe/kha/16,1,2/Tools/khamake/main.js:539:2)
at Object.<anonymous> (/usr/share/haxe/kha/16,1,2/Tools/khamake/khamake.js:376:23)
at Module._compile (module.js:434:26)
at Object.Module._extensions..js (module.js:452:10)
at Module.load (module.js:355:32)
at Function.Module._load (module.js:310:12)
Build server throws this with an otherwise 'new' project that just draws a triangle. I'm used to dealing with the build systems of C++ (make/cmake), elixir (mix), java (sbt/gradle/maven), and a couple minor others, but that does not include node's in any form (I try to avoid javascript...) so this is a bit unusual, especially as I've not seen anything node related to haxe projects in any other form (I try to minimize dependencies, and node was an awfully huge dependency to add to the build server docker image)...
For note:
$ node -v
v4.2.6
EDIT1: Also, the build server base docker image was upgraded to ubuntu/16.04
.
EDIT2: And this when I add "use strict";
to the top of the khafile.js oddity:
Creating Kha project.
undefined:10
resolve(project);
^
ReferenceError: resolve is not defined
at eval (eval at <anonymous> (/usr/share/haxe/kha/16,1,2/Tools/khamake/ProjectFile.js:10:16), <anonymous>:14:1)
at module.exports (/usr/share/haxe/kha/16,1,2/Tools/khamake/ProjectFile.js:10:47)
at exportKhaProject (/usr/share/haxe/kha/16,1,2/Tools/khamake/main.js:344:13)
at exportProject (/usr/share/haxe/kha/16,1,2/Tools/khamake/main.js:451:3)
at Object.exports.run.callback [as run] (/usr/share/haxe/kha/16,1,2/Tools/khamake/main.js:539:2)
at Object.<anonymous> (/usr/share/haxe/kha/16,1,2/Tools/khamake/khamake.js:376:23)
at Module._compile (module.js:434:26)
at Object.Module._extensions..js (module.js:452:10)
at Module.load (module.js:355:32)
at Function.Module._load (module.js:310:12)
EDIT3: The git master is doing:
$ node ../Kha/make --compile
Requires Node.js version 6 or higher.
Which is interesting because the Getting Started page says node v4 or higher, and this is the version that was in the repo...
EDIT4: As per the above linked Getting Started page I ran:
sudo npm cache clean -f
node --version
sudo npm install -g n
sudo npm stable
node --version
And it reports version:
v4.2.6
EDIT5: Also, I have to ask, node? Really? Isn't the node packaging system one of the absolutely horrible ones out there? That people can remove code from and more? I far more prefer the hex packaging system (Elixir/Erlang), or the cargo packaging system (Rust), you have 10 minutes to undo an upload then it is permanent and immutable, as it should be. Node.js is a highly questionable system to base anything on...