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

297
Visualizações
'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 Respostas
Responde à pergunta

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 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