santinic / how2

AI for the Command Line
https://how2terminal.com
MIT License
5.71k stars 156 forks source link

SyntaxError: Unexpected token function #98

Closed fhamborg closed 4 years ago

fhamborg commented 4 years ago

latest version, fresh install.

(base) ➜  ~ how2 python sort
/Users/felix/.npm-global/lib/node_modules/how-2/lib/how2.js:22
async function fetchQuestionAnswers(parsedLink) {
      ^^^^^^^^
SyntaxError: Unexpected token function
    at Object.exports.runInThisContext (vm.js:76:16)
    at Module._compile (module.js:542:28)
    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.require (module.js:497:17)
    at require (internal/module.js:20:19)
    at Object.<anonymous> (/Users/felix/.npm-global/lib/node_modules/how-2/lib/index.js:7:12)
    at Module._compile (module.js:570:32)
(base) ➜  ~
PaoloCifariello commented 4 years ago

Hi @fhamborg, what version of node are you using to run how2?

fhamborg commented 4 years ago

It's v6.9.5

PaoloCifariello commented 4 years ago

how2 uses async/awat, which are available from version 7.6 of node

fhamborg commented 4 years ago

Oh, I'm sorry! Upgraded to 10.16 and it's working fine! Thank you! :-)