boardgameio / boardgame.io

State Management and Multiplayer Networking for Turn-Based Games
https://boardgame.io
MIT License
9.93k stars 707 forks source link

npm start broken on Windows #451

Closed nicolodavis closed 4 years ago

nicolodavis commented 4 years ago

https://github.com/nicolodavis/boardgame.io/blob/master/scripts/dev.sh doesn't run on Windows and needs to be made platform agnostic.

On Linux / OSX you can do the following to run both client and server:

npm install
npm start

Since dev.sh is broken on Windows you can't do this at the moment, although you can use the following manual workaround:

Run Client

npm install
cd examples/react-web
npm install
npm start

Run Server

npm install
npm run dev:server
Stefan-Hanke commented 4 years ago

@tsioap Refering to the PR - this is not only about the directory separator. I've just clone this repo, and npm start didn't work - because the bash command was not found (it is installed though). I'm not sure what scripting language to use for cross-platform purposes. Since NodeJS must be installed, maybe dev.sh could be converted to a JS script? Or maybe inline it completely into package.json?

Stefan-Hanke commented 4 years ago

As a sidenote, maybe a CI job running on windows could take care that some scenarios do not break to begin with.

nicolodavis commented 4 years ago

Yes, we'd have to make it a cross-platform script, similar to https://github.com/nicolodavis/boardgame.io/blob/master/scripts/clean.js. Good point also about adding a check to the CI.

Welcome back @Stefan-Hanke! Long time no see.

tisoap commented 4 years ago

Ah, I understand now. It did work for me because I use Git Bash for Windows. I agree a Node script would be the best choice to make it cross platform regardless of terminal used, I'll look into converting it.

nicolodavis commented 4 years ago

Thanks @tisoap. Feel free to update the existing PR or open a new one if you prefer.

Stefan-Hanke commented 4 years ago

@nicolodavis thanks - hope that I can contribute on a somewhat regular basis. Let's see how things are going.

nicolodavis commented 4 years ago

Your contributions are much appreciated. As always, the current areas of focus are documented in the roadmap. The large ones are the ability to add bots to games, the game lobby and the Svelte migration.