Error at Startup...[Welp]
See original GitHub issueIm getting this error at startup help pls
/home/cabox/workspace/i/src/modules/CommandList.js:821 Logger.print("Average score: " + (scores.reduce((x, y) => x + y) / sco ^^ SyntaxError: Unexpected token => at exports.runInThisContext (vm.js:73:16) at Module._compile (module.js:443:25) at Object.Module._extensions..js (module.js:478:10) at Module.load (module.js:355:32) at Function.Module._load (module.js:310:12) at Module.require (module.js:365:17) at require (module.js:384:17) at Object.<anonymous> (/home/cabox/workspace/i/src/index.js:3:16) at Module._compile (module.js:460:26) at Object.Module._extensions..js (module.js:478:10)
Issue Analytics
- State:
- Created 6 years ago
- Comments:14
Top GitHub Comments
ES6 arrow function notation isn’t supported in older versions of node.js. Either update its version or replace
(x, y) => x + y
withfunction(x, y) { return x + y; }
.I recommend digitalocean @Mr-BrockLee