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

325
Visualizações
Error while connecting to local Redis server in Node.js

I have Redis server running on localhost at port 6379 and I'm connecting to it like that:

const redisClient = redis.createClient({
        url: `redis://localhost:6379`,
        legacyMode: false
}); 

Although when I try to connect to it, it gives the following error:

TypeError [ERR_INVALID_ARG_TYPE]: The "chunk" argument must be of type string or an instance of Buffer or Uint8Array. Received undefined
    at new NodeError (node:internal/errors:371:5)
    at _write (node:internal/streams/writable:312:13)
    at WriteStream.Writable.write (node:internal/streams/writable:334:10)
    at Commander.<anonymous> (C:\Users\atsukoro\Desktop\Projekty\simpleanilist\src\index.ts:42:24)   
    at Commander.emit (node:events:526:28)
    at Commander.emit (node:domain:475:12)
    at RedisSocket.<anonymous> (C:\Users\atsukoro\Desktop\Projekty\simpleanilist\node_modules\@redis\client\dist\lib\client\index.js:347:35)
    at RedisSocket.emit (node:events:526:28)
    at RedisSocket.emit (node:domain:475:12)
    at RedisSocket._RedisSocket_connect (C:\Users\atsukoro\Desktop\Projekty\simpleanilist\node_modules\@redis\client\dist\lib\client\socket.js:114:14) {
  code: 'ERR_INVALID_ARG_TYPE'
}

I found that legacyMode false will fix that issue but that didn't work either.

about 4 years ago · Juan Pablo Isaza
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