FGRibreau / mixpanel-cli

🎩 mixpanel-cli - A complete CLI to query Mixpanel API
https://twitter.com/FGRibreau
10 stars 1 forks source link

Fails on node v4 #1

Closed eugeneware closed 7 years ago

eugeneware commented 7 years ago

Seems to require a more recent version of node:

$ mixpanel
/Users/eugeneware/.nvm/versions/node/v4.6.0/lib/node_modules/mixpanel-cli/mixpanel-cli.js:69
protocol.forEach(({method: {name, arguments:args}, description}) => {
                  ^

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 Module.require (module.js:353:17)
    at require (internal/module.js:12:17)
    at Object.<anonymous> (/Users/eugeneware/.nvm/versions/node/v4.6.0/lib/node_modules/mixpanel-cli/mixpanel:3:1)
    at Module._compile (module.js:409:26)
    at Object.Module._extensions..js (module.js:416:10)

Works OK on v6 or v7 though.

Might be worth adding that to the README.

FGRibreau commented 7 years ago

That's intended, see https://github.com/FGRibreau/mixpanel-cli/blob/master/package.json#L6 :)

Please use our docker image if you don't have an up-to-date NodeJS environment :)