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

300
Views
'TypeError: Cannot read property 'prototype' of undefined' Redis connections

I am trying to connect to a Redis Azure instance and I'm following the tutorial here Link. However I keep receiving this error

"TypeError: Cannot read property 'prototype' of undefined"

on this line

bluebird.promisifyAll(redis.RedisClient.prototype);

I am using nodeJS on VSCode. I have npm installed redis and bluebird. Any help would be appreciated, thank you!

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

"TypeError: Cannot read property 'prototype' of undefined"

1. Make sure to remove import response from { 'express' } which might be got imported by default in your action page.

2. You can refer to how proptotype works under promisifyAll

Class property is a property with a function value that has a non-empty .prototype object. Returns the input object. Note that the original methods on the object are not overwritten but new methods are created with the Async-suffix. For example, if you promisifyAll the node.js fs object use fs.statAsync to call the promisified stat method.

Promise.promisifyAll(require("redis"));

//Later on, all redis client instances have promise returning functions:

redisClient.hexistsAsync("myhash", "field").then(function(v) {

}).catch(function(e) {

});

Reference: TypeError: Cannot read property 'prototype' of undefined React Express and Promise.promisifyAll

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