Skip to content

so many bug, cannot run it #20

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
myworldbox opened this issue Apr 13, 2023 · 4 comments
Open

so many bug, cannot run it #20

myworldbox opened this issue Apr 13, 2023 · 4 comments

Comments

@myworldbox
Copy link

`
./src/components/ThemeToggle.tsx
Module parse failed: Bad character escape sequence (2:37)
| import { createProxy } from "next/dist/build/webpack/loaders/next-flight-loader/module-proxy"

const proxy = createProxy("C:\Users\user\Desktop\myworldbox\GitHub\chessu\client\src\components\ThemeToggle.tsx")
|
| // Accessing the __esModule property and exporting $$typeof are required here.
`

@dotnize
Copy link
Owner

dotnize commented Apr 23, 2023

Hello, sorry for the late response.

I see that you've forked the repo again. Is everything working fine now?

@myworldbox
Copy link
Author

myworldbox commented Apr 23, 2023

Hello, sorry for the late response.

I see that you've forked the repo again. Is everything working fine now?

I have resolve the above issue. You can ignore my pull requests. Your game is working, but the socket is not. Maybe two session is created when two players join the game.

Error msg

  • io.use no session

I am using render to deploy pg database. Railway for backend and Vercel for frontend.

I can register account and join game normally. Yet, the game would not start.

The issue is that multiplayer game session would not start.

@dotnize
Copy link
Owner

dotnize commented Apr 24, 2023

Have you tried running this locally?

Everything's working fine for me on local & production deployments, so I can't really help much, but here's how I deployed the repo:

Frontend on Vercel

Just default Next.js configuration, but changed the Root Directory to client and checked "Include source files outside..."
image

Environment variables

image

Backend & database on Railway

Default root directory, but changed build & start commands. I also modified the install command using an environment variable below.
image
image

Environment variables

I added a custom NIXPACKS_INSTALL_CMD variable for Railway to avoid installing unnecessary client dependencies.
The database-related variables were automatically provided by Railway since I also hosted the database there.
Provide your own SESSION_SECRET
image

Database

These 3 tables should be created automatically when running the server:
image

@myworldbox
Copy link
Author

myworldbox commented Apr 24, 2023

Quick update

The game only works if I join the chess game using [Chrome vs Edge] on Window

If I use [Chrome vs Chrome] on Windows or [Chrome vs IOS] on iPhone, the game session is joined but cannot start.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants