1
resposta

Erro após o comando npm run dev

Olá,

Aparece um erro relacionado ao Redis conforme resultado abaixo. Alguém poderia me indicar o que pode ser?

[nodemon] 2.0.4
[nodemon] to restart at any time, enter `rs`
[nodemon] watching path(s): *.*
[nodemon] watching extensions: js,mjs,json
[nodemon] starting `node server.js`
A API está funcionando!
events.js:292
      throw er; // Unhandled 'error' event
      ^

Error: Redis connection to 127.0.0.1:6379 failed - connect ECONNREFUSED 127.0.0.1:6379
    at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1141:16)
Emitted 'error' event on RedisClient instance at:
    at RedisClient.on_error (D:\Google Drive\Disciplinas 2021.2\Desenvolvimento Web II - SI2018 e SAGA e SI 2019\Projetos\PROJETO RBAC INICIAL\nodeauth3-projeto-inicial\node_modules\redis\index.js:342:14)
    at Socket.<anonymous> (D:\Google Drive\Disciplinas 2021.2\Desenvolvimento Web II - SI2018 e SAGA e SI 2019\Projetos\PROJETO RBAC INICIAL\nodeauth3-projeto-inicial\node_modules\redis\index.js:223:14)
    at Socket.emit (events.js:315:20)
    at emitErrorNT (internal/streams/destroy.js:92:8)
    at emitErrorAndCloseNT (internal/streams/destroy.js:60:3)
    at processTicksAndRejections (internal/process/task_queues.js:84:21) {
  errno: 'ECONNREFUSED',
  code: 'ECONNREFUSED',
  syscall: 'connect',
  address: '127.0.0.1',
  port: 6379
}
[nodemon] app crashed - waiting for file changes before starting...
1 resposta

Oi Warley, tudo bem? A API não está conseguindo conectar no Redis, você tem o Redis funcionando na sua máquina?

Quer mergulhar em tecnologia e aprendizagem?

Receba a newsletter que o nosso CEO escreve pessoalmente, com insights do mercado de trabalho, ciência e desenvolvimento de software