Spotify-Readme
Spotify-Readme copied to clipboard
404 error when deploying
After deploying on Vercel I see this error.
I tried revising my vercel.json to be this:
{
"rewrites": [
{ "source": "/(.*)", "destination": "/" }
],
"headers": [
{
"source": "/api/(.*)",
"headers": [
{ "key": "Access-Control-Allow-Credentials", "value": "true" },
{ "key": "Access-Control-Allow-Origin", "value": "*" },
{ "key": "Access-Control-Allow-Methods", "value": "GET,OPTIONS,PATCH,DELETE,POST,PUT" },
{ "key": "Access-Control-Allow-Headers", "value": "X-CSRF-Token, X-Requested-With, Accept, Accept-Version, Content-Length, Content-MD5, Content-Type, Date, X-Api-Version" }
]
}
]
}
That didn't work.
Any tips are greatly appreciated.
Hi @swersk,
There is no need to modify your vercel.json file. You just need to visit https://{PROJECT_NAME}.vercel.app/api, replacing {PROJECT_NAME} with the name you gave your Vercel project.
Please check your the logs for your Vercel project and reply with a screenshot of the error you're getting
~the same is happening with me, i did not change any files and thoroughly followed all steps but still its not working...~
i got it working somehow