Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

356
Views
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 answers
Answer question

0

Try this

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

about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!