jstack
jstack copied to clipboard
Unable to use websockets
Description
I followed the WebSocket setup as described in the JStack docs, but I encountered the following errors:
-
async/await is not yet supported in Client Components, only Server Components. This error is often caused by accidentally adding 'use client' to a module that was originally written for the server.
-
A component was suspended by an uncached promise. Creating promises inside a Client Component or hook is not yet supported, except via a Suspense-compatible library or framework.
-
TypeError: socket.on is not a function
Reproduction Steps
- Started from the official JStack WebSocket example.
- Implemented the WebSocket connection as shown in the docs.
- Ran the project and encountered the above errors.