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

257
Views
Why getting 404 error in routing in next.js?

I have a Next.js application.Initially the homepage is loaded to the user and after a timer of 10 the user has to be redirected to a feedback page:

 const router=useRouter();
 if(timer==0)
  {
    router.push('/feedback');
    clearTimeout(time);
  }

However at the time of routing to feedback page , Im getting the following error:

404
This page could not be found.

Feedback page:

import type { NextPage} from 'next'
import Head from 'next/head'
import Image from 'next/image'
import styles from '../styles/Home.module.css'
import {useState} from 'react'
const Feedback: NextPage=()=>{
    const [name,setName]=useState("");
    const [email,setEmail]=useState("");
    const handleSubmit=(e)=>{
        e.preventDefault();
        console.log(name);
        console.log(email);

    }
    return(
        <form onSubmit={(e)=>handleSubmit(e)}>
        <div>
        <label htmlFor="name">Name</label>
        <input
          type="text"
          id="name"
          value={name}
          onChange={(e) => setName(e.target.value)}
        />
        </div>
        <div>
        <label htmlFor="email">Email</label>
        <input
          type="text"
          id="email"
          value={email}
          onChange={(e) => setEmail(e.target.value)}
        />
        </div>
      </form>
    )
}

export default Feedback;

Inspite of having a feedback page in the pages folder, Im getting this error.

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!