Closed MitchellJeppson closed 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.
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?
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.
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.