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

531
Views
NextJS API resolved without sending a response

I am learning about getServerSideProps, I have a file 'hello.js' in pages/api/hello.js and the code is:

    function Hello({ data }) {
    return (
        <>
            <h1>{data}</h1>
        </>
    )
}
  
// This gets called on every request
export async function getServerSideProps() {
    // Fetch data from external API
    const res = await fetch(`https://ergast.com/api/f1/2021/drivers.json`)
    const data = await res.json()

    // Pass data to the page via props
    return { props: { data } }
}

export default Hello

I can't access the page due to the following error: API resolved without sending a response for /api/hello, this may result in stalled requests.

The code has been taken from here with a few tweaks: https://nextjs.org/docs/basic-features/data-fetching/get-server-side-props

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