The production server was sending raw Yjs updates but the client (y-websocket's WebsocketProvider) expects the y-protocols sync protocol with message type headers. This caused "Unexpected end of array" errors on every connection. Rewrite to match the Vite dev plugin: use y-protocols/sync for document sync, y-protocols/awareness for presence, and lib0 for encoding. Verified locally: server starts, WebSocket connects, sync messages exchange correctly. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| app | ||
| Dockerfile | ||
| package.json | ||
| react-router.config.ts | ||
| server.ts | ||
| tsconfig.json | ||
| vite.config.ts | ||