chamatt / create-kaol-app

Kaol Stack - Prisma, Expo, Next, TRPC, Solito, Tailwind - A monorepo template for a truly universal app

Home Page:https://kaol.vercel.app/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Steps missing for deploying?

wezter96 opened this issue · comments

Hi! :)
I've tried to use this template but when deploying to Vercel I first get issues with env variables for Prisma.
image

if I push my env variables to the repository as well as Vercel I manage to get it deployed but none of my paths are working.

I enabled directory listing but I'm relatively new to Next.js (only tried it a bit through Solito) so it didn't make me much wiser.
https://gig-hub.vercel.app/

image

Are there some steps missing on how I should get this template deployded?
I'm looking to move my Solito project to this template but sadly I'm a bit stuck.

Hi @wezter96. Maybe there's some step missing. Can you check on your vercel config and see if the next.js entry point is configured as follows?
image

And from the error that is showing, it seems like you haven't configured all the required env variables in vercel. It must be configured as it says in the readme (all three):
image

You shouldn't use your local .env file, you should use the environment variables from vercel. You can find it in your project settings -> Environment Variables.

Hi @chamatt, thanks for getting back to me.
I even deleted the local .env file and I still get the same error.
Is there anything I need to change in Build & Development Settings?
Should I have it marked as Production, Preview and Development even though it says only to have it marked as Production?
Sorry it took a while for me to respond, I injured my hands 1.5 weeks ago so I haven't been programming as much.
I have the env variables configured in Vercel but somehow Prisma does not seem to find the env if I am not missing something?

image

image

image

@chamatt Do you think this might be the issue in the repo it says to add a MIGRATION_DB_URL env variable in vercel but in the script in the package json file it says MIGRATE_DB_URL?
"vercel-build": "DATABASE_URL=$MIGRATE_DB_URL prisma generate && DATABASE_URL=$MIGRATE_DB_URL prisma migrate deploy && next build"

image

@wezter96 Yep, that's most probably it. I just fixed this on the readme. Thank you for pointing this out