ravens-engine / core

A Javascript library for building multiplayer turn-based games
https://ravens.dev/
15 stars 2 forks source link

Tutorial issue: having trouble with `parcel` command #10

Closed mrhappyasthma closed 3 years ago

mrhappyasthma commented 3 years ago

When instructed to run parcel index.html, I was having issues. Seems I can get it to run by specifying npx to run the installed module, since I don't have a separate install for parcel.

e.g.

npx parcel --port 8080 index.html

Is this something that should be changed in the tutorial or is it an issue with my setup?

Longwelwind commented 3 years ago

Put it inside your package.json, like so: https://github.com/ravens-engine/tic-tac-toe/blob/main/package.json

Then run npm run start-client

mrhappyasthma commented 3 years ago

I think there were two issues:

  1. The default port for parcel is 1234 but the tutorial referenced 8080. We should probably update the tutorial doc to reflect 1234.

  2. Calling parcel directly did not work unless I used npx. (I did eventually move this command into my package.json.) I believe this was because I did not install it globally (with the -g flag in npm). To be safe we should consider updating the tutorial to use the npx parcel... format, in case other users have the same issue.

What do you think?

Longwelwind commented 3 years ago

I've never used npx before as I've always put my commands into package.json, but I'm ok to put it in the tutorial 🙂