Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Steps missing for deploying? #4

Closed
wezter96 opened this issue Sep 15, 2022 · 4 comments
Closed

Steps missing for deploying? #4

wezter96 opened this issue Sep 15, 2022 · 4 comments

Comments

@wezter96
Copy link

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.

@chamatt
Copy link
Owner

chamatt commented Sep 20, 2022

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.

@wezter96
Copy link
Author

wezter96 commented Oct 1, 2022

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

@wezter96
Copy link
Author

wezter96 commented Oct 7, 2022

@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

@chamatt
Copy link
Owner

chamatt commented Oct 20, 2022

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

@chamatt chamatt closed this as completed Oct 20, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants