SabakiHQ / LeelaSabaki

Leela (Zero) integration with Sabaki.
MIT License
153 stars 35 forks source link

Syntax error on startup #1

Closed apetresc closed 6 years ago

apetresc commented 6 years ago

When invoking leelasabaki, either from the CLI or through Sabaki, it immediately crashes with:

/snapshot/LeelaSabaki/src/index.js:95
lineReader.on('line', async input => {
                      ^^^^^

SyntaxError: missing ) after argument list
    at createScript (vm.js:56:10)
    at Object.runInThisContext (vm.js:97:10)
    at Module._compile (module.js:542:28)
    at Module._compile (pkg/prelude/bootstrap.js:1250:32)
    at Object.Module._extensions..js (module.js:579:10)
    at Module.load (module.js:487:32)
    at tryModuleLoad (module.js:446:12)
    at Function.Module._load (module.js:438:3)
    at Module.runMain (pkg/prelude/bootstrap.js:1298:12)
    at run (bootstrap_node.js:419:7)

I don't know anything about the NodeJS ecosystem, but this smells like some sort of language version mismatch to me. I'm running:

$ node --version
v6.10.3
$ npm --version
3.10.10
yishn commented 6 years ago

Yes, you need a node version that supports async functions; I think version 8 is okay. I assume you're running it directly with node?

yishn commented 6 years ago

Ah, I see what's going on, the build script doesn't specify the node version to be used, so it defaults to the node version you have installed on your system. This should probably be fixed. In the meantime, you can use 'npm run build:all' to build executables with the correct version of node... or just update your node.js. 😉

apetresc commented 6 years ago

Indeed, this solved it :) Thanks!