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

225
Vistas
Problem with Passport serializeUser function

I was making a website written in Typescript with Dashboard and the login is the Discord Oauth2.

I started my app and the Console gave me a new error:

TypeError: Cannot read properties of undefined (reading 'push')
    at Authenticator.serializeUser (/home/project/node_modules/passport/lib/authenticator.js:254:30)
    at Object.<anonymous> (/home/project/build/wbs/server/users/routes.config.js:70:30)
    at Module._compile (node:internal/modules/cjs/loader:1097:14)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1149:10)
    at Module.load (node:internal/modules/cjs/loader:975:32)
    at Function.Module._load (node:internal/modules/cjs/loader:822:12)
    at Module.require (node:internal/modules/cjs/loader:999:19)
    at require (node:internal/modules/cjs/helpers:102:18)
    at Object.<anonymous> (/home/project/build/wbs/server/main.js:37:41)
    at Module._compile (node:internal/modules/cjs/loader:1097:14)

I searched the line 70 of the file routes.config.js and the line is this.

passport.serializeUser(function(user, done) {
    // @ts-ignore
    done(null, user.discordId);
});

I really don't know what to say.

Can someone help me? If more info is needed I will add it.

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