siddharthkp / historie

A searchable history cli
MIT License
60 stars 2 forks source link

Unexpected token { #6

Closed Frique closed 7 years ago

Frique commented 7 years ago

At the first try right after installing I get the following error:

~/.config/yarn/global/node_modules/historie/index.js:18
inquirer.prompt(options).then(({ command }) => exec(command))
                               ^

SyntaxError: Unexpected token {
    at exports.runInThisContext (vm.js:53:16)
    at Module._compile (module.js:373:25)
    at Object.Module._extensions..js (module.js:416:10)
    at Module.load (module.js:343:32)
    at Function.Module._load (module.js:300:12)
    at Function.Module.runMain (module.js:441:10)
    at startup (node.js:139:18)
    at node.js:968:3
hamxabaig commented 7 years ago

@Frique this is because of your node version probably. Because javascript's short hand property is introduced in newer versions of Node. I think above 4. (maybe i'm wrong)

hamxabaig commented 7 years ago

Okay, this link says node 4.8 have it.

siddharthkp commented 7 years ago

@hamxabaig, historie does not support older versions of node right now.

hamxabaig commented 7 years ago

@siddharthkp Yes, I guessed so.

Frique commented 7 years ago

@hamxabaig @siddharthkp Thanks. I was using 4.4.4 when I got the error. After upgrading to 6.11.1 it works.