boardgameio / boardgame.io

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

CodeSandbox in documentation broken #512

Closed MitchellJeppson closed 4 years ago

MitchellJeppson commented 4 years ago

The documentation page for multiplayer links to a code sandbox and states "Complete code from this section is available on CodeSandbox. To run it, click on the download button, then run the server and client as described above."

When you follow those steps and start the server using $ node -r esm src/server.js

You get the following error:

SyntaxError: The requested module 'file:///game/node_modules/boardgame.io/dist/cjs/core.js' does not provide an export named 'Game' at Object. (/game/src/game.js:1) at Generator.next () at Object.Module._extensions..js (module.js:663:10) at Object. (/game/src/server.js:3:19)

Link to codesandbox: https://codesandbox.io/s/boardgameio-5lbe5

It may be a simple fix but figured I'd check in either way.

delucis commented 4 years ago

Sounds like the CodeSandbox is out of date. The Game constructor was removed in v0.33 as documented in the migration guide.

MitchellJeppson commented 4 years ago

Thanks for the quick response. It looks like you can just remove the entire import statement. Is there anything else I can do to propose the change? Or is that CodeSandbox handled separately?

nicolodavis commented 4 years ago

I usually just update the code in CodeSandbox and then change the link on the doc page. Feel free to do this if you have time. Otherwise, I'll get to it after the next release.