roccomuso / alveare

:honeybee: Multi-client, multi-threaded reverse shell handler written in Node.js
MIT License
73 stars 13 forks source link

SyntaxError: Unexpected token { #1

Closed andrew-stclair closed 6 years ago

andrew-stclair commented 6 years ago

Hello,

when i try to start the package, i get this error

/usr/local/lib/node_modules/alveare/cli.js:3
const {start} = require('./lib/index')
      ^

SyntaxError: Unexpected token {
    at exports.runInThisContext (vm.js:53:16)
    at Module._compile (module.js:374:25)
    at Object.Module._extensions..js (module.js:417:10)
    at Module.load (module.js:344:32)
    at Function.Module._load (module.js:301:12)
    at Function.Module.runMain (module.js:442:10)
    at startup (node.js:136:18)
    at node.js:966:3

have i done something wrong?

fresh install of nodejs on ubuntu 16.04.3 LTS

roccomuso commented 6 years ago

@St0ner1995 What version of Node.js? node -v

andrew-stclair commented 6 years ago

v4.2.6

roccomuso commented 6 years ago

That version of node doesn't support js destructuring. Update to version v6.4.0 or above.

// destructuring example
const {start} = require('./lib/index')
// is equals to:
const start = require('./lib/index').start