Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

285
Visualizações
Socket implementation is showing problem in react js

On implementing the socket.io-client in my project it is showing an error and the connection status is false.

This is the code of socket.

 socket = io('url', {
    transports: ['websocket']
 })
 console.log(socket)

and I am using the socket version

 "socket.io-client": "^4.5.1",

But the console is showing

 It seems you are trying to reach a Socket.IO server in v2.x with a v3.x client, but they are not compatible (more information here: https://socket.io/docs/v3/migrating-from-2-x-to-3-0/)
about 4 years ago · Santiago Gelvez
1 Respostas
Responde à pergunta

0

Changed Version from

"socket.io-client": "^4.5.1",

To

"socket.io-client": "^1.7.4",

And Changed

import {io} from "socket.io-client

To

import io from "socket.io-client
about 4 years ago · Santiago Gelvez Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda