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

398
Views
getting error "Error: ENOTDIR: not a directory, access " in my next js page

When I make new page called as AboutPage.js inside pages folder then I get some error in terminal and on my UI on my NEXT JS app when I try to access that page.

The ERROR is:

error - Error: ENOTDIR: not a directory, access '/mnt/BEAA30A3AA305A5B/KevalActivity/Skills/Programming/Builds/JavaScript/Next JS/instagram-clone/pages/AboutPage.js/index.tsx'

and I am attaching the error image.

Error preview in my browser

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

0

this is not how you are supposed to declare new pages with Nextjs.

I refer you to this documentation about the routing system : https://nextjs.org/docs/routing/introduction

You should only have an AboutPage.js file in your pages directory, and then access it with url localhost:3000/aboutpage .

about 4 years ago · Juan Pablo Isaza Report

0

You are fetch or query or ... to a file in a wrong way. In React, Next and ... you have to remove .js from fetch address.

As "Bloodbee" said: about.js => /about

And

const response = await fetch("/api/upload.js", { ... });

=>

const response = await fetch("/api/upload", { ... });

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!