Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

383
Vistas
Redis Uncaught TypeError: Cannot read properties of undefined (reading 'charCodeAt')

I'm using the npm package node-redis version 3.1.0 and I've included the following in my .vue file, specifically in the <script></script> block:

import { createClient } from 'redis';

Inside methods for export default, I have the following:

async getVal(redisKey) {
  const client = createClient();
  // eslint-disable-next-line
  client.on('error', (err) => console.log('Redis Client Error', err));
  await client.connect();
  const value = await client.get(redisKey);
  return value;
},

The code compiles with no errors, but when I launch my site in the browser, I get the following error in my browser console:

index.js:3 Uncaught TypeError: Cannot read properties of undefined (reading 'charCodeAt')
    at Object.<anonymous> (index.js:3)
    at Object.f3c2 (chunk-vendors.bcef36a0.js:73)
    at i (bootstrap:79)
    at Object.b620 (customErrors.js:5)
    at i (bootstrap:79)
    at Object.<anonymous> (index.js:9)
    at Object.a111 (chunk-vendors.bcef36a0.js:41)
    at i (bootstrap:79)
    at Module.56d7 (app.05cc1827.js:1)
    at i (bootstrap:79)
(anonymous) @   index.js:3
f3c2        @   chunk-vendors.bcef36a0.js:73
i           @   bootstrap:79
b620        @   customErrors.js:5
i           @   bootstrap:79
(anonymous) @   index.js:9
a111        @   chunk-vendors.bcef36a0.js:41
i           @   bootstrap:79
56d7        @   app.05cc1827.js:1
i           @   bootstrap:79
0           @   app.05cc1827.js:1
i           @   bootstrap:79
a           @   bootstrap:45
(anonymous) @   bootstrap:152
(anonymous) @   app.05cc1827.js:1

index.js:

'use strict'

const Errors = process.version.charCodeAt(1) < 55 && process.version.charCodeAt(2) === 46
  ? require('./lib/old') // Node.js < 7
  : require('./lib/modern')

module.exports = Errors

How do I fix this? I don't understand what I'm doing wrong that would cause this error.

about 4 years ago · Juan Pablo Isaza
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda