colyseus / colyseus-examples

Examples for learning how Colyseus works
https://examples.colyseus.dev/
MIT License
178 stars 90 forks source link

Problem with ZEIT deploy #16

Closed daimonkor closed 4 years ago

daimonkor commented 5 years ago

Please fix now.json file, does not work project at ZEIT deployment. Thanks for help.

endel commented 5 years ago

can you provide the logs @daimonkor? cheers!

daimonkor commented 5 years ago

http://prntscr.com/mkpvlf https://colyseus-examples-fkel2wswv.now.sh/

http://prntscr.com/mkpw65 I think that missing build ts files I tryied use https://github.com/zeit/now-builders/issues/46# - nothing

endel commented 5 years ago

thanks @daimonkor, managed to deploy now using "version": 2 on now.json file: https://colyseus-examples-dhbbjzitqb.now.sh/

I've dragged the folder of the project to zeit-now's icon on my desktop, and the deployment was successful.

Cheers!

daimonkor commented 5 years ago

@endel What is my problem? http://prntscr.com/mkqf2c http://prntscr.com/mkqfpn http://prntscr.com/mkqg1k Thanks for help.

endel commented 5 years ago

@daimonkor that's odd. It seems it didn't recognize it as a node application, and it's trying to download the index.ts file.

I've deployed just like this: https://drive.google.com/open?id=15TsVI52yUxfjrbDbz-V4gvSe3WiJ3dNd

Don't really know what's going wrong there :(

daimonkor commented 5 years ago

Magic, the same state http://prntscr.com/mkqjgk http://prntscr.com/mkqjr7 . Official application, downloaded today. @endel Please try to check with help CLI (console)

paulogdm commented 5 years ago

With the current now.json, without "builds", it is deploying as static. Do notice that our current Now 2.0 still doesn't support WSS, which is needed for this repository, if I understand it correctly. Please @daimonkor, take a look at our examples before deploying.

daimonkor commented 5 years ago

But I saw worked sample https://drive.google.com/open?id=15TsVI52yUxfjrbDbz-V4gvSe3WiJ3dNd ). What is the magic? Client used ws http://prntscr.com/mks4ye

endel commented 5 years ago

@daimonkor I can reproduce your issue using now from the command-line. I'll follow @paulogdm's suggestion and will update the repository as soon as I get it working

daimonkor commented 5 years ago

@endel Thank you very much

endel commented 5 years ago

@daimonkor apparently now v2 still doesn't support WebSockets (as @paulogdm mentioned, and I thought it was only for Secure WebSockets 😅)

I've changed the now.json file to use v1 instead, which I've managed to deploy successfully from the command-line!

Let me know if it works for you @daimonkor

daimonkor commented 5 years ago

@endel I tested http://prntscr.com/mkslb9. Used node module Now CLI 13.1.3 (npm install now -g).

endel commented 5 years ago

@daimonkor that's odd, here the command-line asks me if you'd like to proceed, and then it deploys sucessfully

screenshot 2019-02-13 at 21 22 20

daimonkor commented 5 years ago

@endel Version numbers are common, but they are different releases.

https://github.com/zeit/now-cli/issues/1805#issuecomment-452470953

endel commented 5 years ago

thanks @daimonkor, I guess I can deploy because my account may be older than yours, it's a shame they're disabling V1 for new users, given that V2 doesn't even support WebSockets yet. 😢

daimonkor commented 5 years ago

Still waiting support)

endel commented 5 years ago

I'm afraid it will take long for them to support environments with WebSockets, you'd be better off using Heroku or a VPS, their support tickets about this are months old

daimonkor commented 5 years ago

@endel I will try use Heroku, thanks. Fine I deployed current sample) https://colyseus-examples-test.herokuapp.com.

endel commented 4 years ago

Zeit is not listed anymore as a deployment target due to how their new system works