DEV Community

Cover image for How to Fix Vercel 404 error: Child URL Path Issues

How to Fix Vercel 404 error: Child URL Path Issues

David Bilson on October 11, 2023

Vercel is a popular hosting platform for front-end applications, offering various deployment and hosting features. Deploying a React app to Vercel ...
Collapse
 
kolort profile image
kolort

Same here...

Although I am building a project without any framework at the moment (pure vanilla for now), I did add the vercel.json file to my project folder with the suggested code but I keep running into the same issue.

When checking the logs in Vercel, I only get this info:

Image description

Any help would be appreciated :)

Collapse
 
hassanabuya82 profile image
Hassan

it still hasen't work in my case

Collapse
 
kolort profile image
kolort

okay I finally managed to solve the issue in my case and the solution:
I just had to update my initial home page name to index.html (previously my homepage was named differently), and it seems like vercel need this index file (as mentioned in this page: vercel.com/docs/edge-network/direc... )

Maybe it's the same for you?

Collapse
 
rezaprtma391 profile image
Reza Pratama

I've done that, is the file outside the folder?

Collapse
 
hikmah_adetunji profile image
Hikmah Adetunji

Yeah, it is. Thanks for sharing this information. It really saves a developer from being confused :)

Collapse
 
leunsensei profile image
Leunsensei

had to create an account just to thank you. i was loosing my mind, but i realised my file was spelled Index.html, with a capital 'I'

Collapse
 
dreamchaser profile image
gard

worked on my case, using vite, react and after adding the vercel.json file on my client directory: npm create vite@latest client the error 404 does not occur.

Collapse
 
hanzalahwaheed profile image
Hanzalah Waheed

Worked for me. Thanks David!

Collapse
 
blazzed profile image
Alexandr Sekerin

Thx!

Collapse
 
kemboi_dun profile image
Kemboi Dun

This worked.