This repository has been archived by the owner on Dec 20, 2024. It is now read-only.
Index JS code showing instead of the homepage in Vercel Deployment #7476
Replies: 1 comment
-
This discussion was automatically closed because the community moved to vercel.community |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Question
I am working on an ecommerce app using mern stack.
I tried deploying it on vercel but for some reason the homepage shows the index js code and no other routes work, neither the api routes nor the react router routes. But the static files can be seen, like images in the static directory.
I am pretty sure there is something wrong in the vercel.json. I didn't find any tutorial on vercel.json
Here is the repo link : https://github.com/ishanjarwal/mern-sneaker-store
Folder Structure : in the root, there are two folders : api and client. the api folder contains a dist for react's build. the api folder is what I want to be deployed and I don't want a seperate repo with api as the root folder.
Please give a solution along with explaination.
Beta Was this translation helpful? Give feedback.
All reactions