xynxynxyn / terminal-discord

NOT MAINTAINED Simple terminal client for discord with a minimal look and UI
MIT License
169 stars 16 forks source link

SyntaxError: Block-scoped declarations (let, const, function, class) not yet supported outside strict mode #9

Closed pfych closed 6 years ago

pfych commented 6 years ago

I justed installed it and when I ran it I got this error

/usr/local/lib/node_modules/terminal-discord/index.js:167
                for (let i = 0; i < channels.length; i++) {
                     ^^^

SyntaxError: Block-scoped declarations (let, const, function, class) not yet supported outside strict mode
    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
xynxynxyn commented 6 years ago

It seems like your version of node doesn't support es6. I replaced all block-scoped declarations with var to make it easier in f82af98.