Spotify-Readme icon indicating copy to clipboard operation
Spotify-Readme copied to clipboard

404 error when deploying

Open swersk opened this issue 2 years ago • 2 comments

Screenshot 2023-08-14 at 1 16 48 PM

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.

swersk avatar Aug 14 '23 17:08 swersk

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

tthn0 avatar Aug 14 '23 19:08 tthn0

image ~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

nyas1 avatar Dec 25 '23 17:12 nyas1