Closed mreifenberger closed 4 years ago
I'm sorry but your code does not work. If I remove node_modules and run npm i && npm start
, it says Error: Cannot find module './gameConfig'.
Try to add import '@geckos.io/phaser-on-nodejs'
on the first line of server.ts
.
Also, I recommend you to use a more advanced phaser template like phaser-project-template to get started. Or take a look at the geckos.io and phaser multiplayer game example.
Hello Yannic, thanks for the answer. I tried recloning as you said and it worked fine - the classic. I tried adding it to the first line of server.ts but I still get the same error.
I repushed it in case you wanna try again.
Yes I know that this one is not perfect, but I wanna understand what goes on (by doing it myself first) before I start using other peoples' templates :)
I see. This is also the way I learned how to use webpack.
I can clone it again and check it. But please first remove the node_modules folder from git and add a .gitignore file with the content /node_modules/
.
Thanks for understanding
I pushed it now , without node_modules and the git ignore!
Thank you for your efforts :)
I fixed it here. There where a LOT of issues. But nothing wrong with phaser-on-nodejs :)
npm i
to install dependenciesnpm run blabla
to start developmentHope this helps :)
Hi Yannic,
thank you VERY much for looking into that. (Sorry for wasting your time tho now that geckosio runs perfectly fine unlike i said).
It helped me tremendously, thank you :)
I tried running phaser on my server in headless mode, and wanted to use your geckos.io/phaser-on-node dependency. After requiring it in my config I still get the error if (window.hasOwnProperty('webkitAudioContext') && ^ ReferenceError: window is not defined
repo to replicate: https://gitlab.com/mreifenberger/phaser3-typescript-multiplayer-template
Thank you for any help, Mika