platforms icon indicating copy to clipboard operation
platforms copied to clipboard

Current Deploy to Vercel failing

Open perkail opened this issue 1 year ago • 4 comments

After configuring env variables and deploying to Vercel all routes return 404

platforms-starter-kit-three-beryl.vercel.app

perkail avatar Jul 05 '23 21:07 perkail

You'll need a custom domain for this to work – the URL you provided above is not a custom domain (it's a Vercel preview URL).

Guide: https://vercel.com/guides/nextjs-multi-tenant-application#5.-deploy-to-vercel

steven-tey avatar Jul 05 '23 22:07 steven-tey

Thank you @steven-tey - I'll configure a custom domain and report back if there is any issue

perkail avatar Jul 05 '23 22:07 perkail

@steven-tay After configuring custom domains, things seem to be working, but there is a redirect to https://vercel.com/blog/platforms-starter-kit whenever I try to visit my root domain or the Vercel project domain.

Try my root domain at https://yarndi.com

perkail avatar Jul 06 '23 03:07 perkail

@steven-tay After configuring custom domains, things seem to be working, but there is a redirect to https://vercel.com/blog/platforms-starter-kit whenever I try to visit my root domain or the Vercel project domain.

Try my root domain at https://yarndi.com

Did you fix it? I also got the same error as you.

taysoncapital avatar Jul 06 '23 14:07 taysoncapital

@imminist I replied @perkail here: https://github.com/vercel/platforms/issues/236#issuecomment-1624208778 hope it helps.

ericklg avatar Jul 06 '23 19:07 ericklg

I will close this one as @steven-tey said, once you configure a custom domain on Vercel and move name servers everything works great. As for the redirect, just checkout the end of the middleware.ts file and you'll see what's going on

perkail avatar Jul 06 '23 19:07 perkail

@perkail @imminist Awesome to hear that it works! The reason that's happening is cause of the middleware code here: https://github.com/vercel/platforms/blob/main/middleware.ts#L42-L52

You can change it to rewrite to the /home route instead! :)

steven-tey avatar Jul 10 '23 18:07 steven-tey