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

353
Views
nextjs: TypeError: no se pueden leer las propiedades de null (leyendo 'push')

Uso sweetalert2 para mostrar ventanas emergentes:

 export default function Home() { const MySwal = withReactContent(Swal) useEffect(() => { MySwal.fire({ showConfirmButton: false, customClass: { container: "swalPopup" }, html:<Link href={"/profile/dashboard"}><a>TEST</a></Link>, }) }, []); return ('<div>Home</div>') }

Después de que se muestra una ventana emergente, hago clic en TEST y aparece el siguiente error:

 Unhandled Runtime Error TypeError: Cannot read properties of null (reading 'push') Call Stack linkClicked node_modules/next/dist/client/link.js (50:11) onClick node_modules/next/dist/client/link.js (200:16)

Sin sweetalert2 , <Link> funciona bien, de lo contrario aparece el error.

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

Por favor intente esto;

 <Button type="button" onClick={(e) => router.push('/profile/dashboard')}> Test </Button>

o

 <Link href="/"> <a onClick={(e) => handleClick(e, "//profile/dashboard")}>Test</a> </Link>```
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!