menu

WarriorJS

An exciting game of programming and Artificial Intelligence

Channels
# All channels
view-forward
# General
view-forward
# Help
view-forward
# Ideas
view-forward
# Show and tell
view-forward
# Tips & tricks
view-forward
# Tutorials
view-forward
Team

error message when I try to start game

May 13, 2018 at 8:22pm

error message when I try to start game

May 13, 2018 at 8:22pm
sean@Sean-R000513:~$ warriorjs
/usr/local/lib/node_modules/@warriorjs/cli/lib/cli.js:23
async function run(args) {
^^^^^^^^
SyntaxError: Unexpected token function
at Object.exports.runInThisContext (vm.js:76:16)
at Module._compile (module.js:542:28)
at Object.Module._extensions..js (module.js:579:10)
at Module.load (module.js:487:32)
at tryModuleLoad (module.js:446:12)
at Function.Module._load (module.js:438:3)
at Module.require (module.js:497:17)
at require (internal/module.js:20:19)
at Object.<anonymous> (/usr/local/lib/node_modules/@warriorjs/cli/bin/warriorjs.js:3:1)
at Module._compile (module.js:570:32)

May 13, 2018 at 8:28pm
if anyone else has this problem, I had to upgrade Node
  • reply
  • like
$ node -v
to see your version number. If it's below 7.4, you can update it like so:
$ sudo npm install n -g
$ sudo n stable
  • reply
  • like
Thanks, I'm trying that out now
  • reply
  • like
doing that doesn't work on ubuntu 16.04, i'd recommend doing this `curl -sL https://deb.nodesource.com/setup_10.x | sudo -E bash -`
  • reply
  • like

May 14, 2018 at 7:06am
ahh, very good point. I'm on Mac OS. I assume the above will not work on Windows.
  • reply
  • like