meepen / salien-bot

Steam Summer Sale 2018 "Salien" minigame bot - runs in console or browser
MIT License
418 stars 104 forks source link

SyntaxError: Block-scoped declarations #92

Closed Frederic94500 closed 6 years ago

Frederic94500 commented 6 years ago

Hello!

When I execute the headless script in my Raspberry Pi, there is an error:

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: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:140:18)
    at node.js:1043:3
meepen commented 6 years ago

You probably have an older version of node, put "use strict"; at the top of all the js files

On Sat, Jun 23, 2018, 5:14 PM Frederic94500 notifications@github.com wrote:

Hello!

When I execute the headless script in my Raspberry Pi, there is an error:

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: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:140:18) at node.js:1043:3

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/meepen/salien-bot/issues/92, or mute the thread https://github.com/notifications/unsubscribe-auth/AF5lSQImAY_B1_i50nVCVLaidHwlG_9Vks5t_q-wgaJpZM4U07ti .

Frederic94500 commented 6 years ago

That's works! Thanks! I think you can put this in headless.js and jquery_node.js

Francis-Hsu commented 6 years ago

node on Raspbian Stretch is 4.8.x I think, you may use nvm to get the latest version.