Skip to content

Invalid namespace in production #4492

Discussion options

You must be logged in to vote

Hi! The screenshot suggests you are trying to reach the /socket namespace, which does not exist on the server.

Are you looking for the path option instead?

const socket = io(ENDPOINT, {
  path: "/socket",
  transports: ['websocket'],
  autoConnect: false,
});

Reference: https://socket.io/docs/v4/client-options/#path

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@amine-abdelli
Comment options

@darrachequesne
Comment options

@amine-abdelli
Comment options

Answer selected by amine-abdelli
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants