Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

324
Views
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
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!