santinic / how2

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

Unexpected token function when trying to launch how2 #92

Closed firas96 closed 4 weeks ago

firas96 commented 5 years ago

i just installed how2 using :

npm install -g how2

the how-2 version is : how-2@1.7.1

however when i try to to launch how2 i get the following error

/usr/local/lib/nodejs/node-v6.13.1-linux-x64/lib/node_modules/how-2/lib/how2.js:21
async function fetchQuestionAnswers(parsedLink) {
      ^^^^^^^^

SyntaxError: Unexpected token function
    at createScript (vm.js:56:10)
    at Object.runInThisContext (vm.js:97:10)
    at Module._compile (module.js:549:28)
    at Object.Module._extensions..js (module.js:586:10)
    at Module.load (module.js:494:32)
    at tryModuleLoad (module.js:453:12)
    at Function.Module._load (module.js:445:3)
    at Module.require (module.js:504:17)
    at require (internal/module.js:20:19)
    at Object.<anonymous> (/usr/local/lib/nodejs/node-v6.13.1-linux-x64/lib/node_modules/how-2/lib/index.js:7:12)

~# npm --v . outputs --- 3.10.10 ~# node --version . outputs --- v6.13.1 ~# uname -a . outputs --- Linux krang 4.19.0-kali4-amd64 #1 SMP Debian 4.19.28-2kali1 (2019-03-18) x86_64 GNU/Linux

VladimirMikulic commented 4 years ago

@firas96 Update your Node.js version. Async & Await keywords are not supported by node versions < 7.6. I would recommend you to update Node.js to the most recent version.