olistic / warriorjs

🏰 An exciting game of programming and Artificial Intelligence
https://warriorjs.com
MIT License
9.43k stars 490 forks source link

Cannot run on Windows 10 after initial install #80

Closed glenpierce closed 6 years ago

glenpierce commented 6 years ago

Environment

'npx' is not recognized as an internal or external command, operable program or batch file.

I'm running Windows 10 with npm version 4.5.0 and Node version 6.10.3

Steps to reproduce

  1. Install warriorjs by entering npm install --global @warriorjs/cli on the command line.
  2. Install the dependency for warriorjs by entering npm install --global @warriorjs/core
  3. Attempt to run warriorjs by entering warriorjs

Expected Behavior

The app should run.

Actual Behavior

Instead, an error message displays:

C:\[my directory tree]\npm\node_modules\@warriorjs\cli\lib\cli.js:23 async function run(args) { ^^^^^^^^ SyntaxError: Unexpected token function at createScript (vm.js:56:10) at Object.runInThisContext (vm.js:97:10) 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> (C:\[my directory tree]\npm\node_modules\@warriorjs\cli\bin\warriorjs.js:3:1)

olistic commented 6 years ago

Thanks for the detailed report. Yeah, npx is available starting with npm v5.2.0.

WarriorJS needs Node 8, if you update to that version this will no longer be an issue. As stated in #78, I'm working on improving Node.js support (at least add Node 10 compatibility) and document the requirements.

I'm closing this now, feel free to re-open if you're still having issues after upgrading to Node 8.