Skip to content
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

Unable to use websockets #30

Open
Shivam-002 opened this issue Feb 2, 2025 · 0 comments
Open

Unable to use websockets #30

Shivam-002 opened this issue Feb 2, 2025 · 0 comments

Comments

@Shivam-002
Copy link

Description

I followed the WebSocket setup as described in the JStack docs, but I encountered the following errors:

  1. 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.

  2. 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.

  3. TypeError: socket.on is not a function

Reproduction Steps

  1. Started from the official JStack WebSocket example.
  2. Implemented the WebSocket connection as shown in the docs.
  3. Ran the project and encountered the above errors.
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

1 participant