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

360
Vistas
Failing Vercel deploy with error TypeError: Cannot read property 'split' of undefined at multiple objects

I'm trying to deploy my webapp for the first time and I'm getting this error on Vercel:

TypeError: Cannot read property 'split' of undefined at Object.3qS3 (/vercel/path0/.next/serverless/pages/[collection]/[templateId].js:2510:16)

I'm recieving the error regarding multiple objects. I believe this is what's causing the issue:

  const balanceAmount = parseFloat(
    currentUserBalance.split(' ')[0].replace(/[,]/g, '')
  );

I don't understand what's causing the issue.

Edit. I tried adding the following conditional statement before:

 if (currentUserBalance == undefined) {
    currentUserBalance === '1';
  }

it didn't seem to work.

about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

Try this

const balanceAmount = parseFloat(
    currentUserBalance?.split(' ')[0]?.replace(/[,]/g, '')
  );

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