Vercel Deployment Invalid Env Variables

Hello, I've been trying to figure out why deploying to vercel is causing this issue during the build phase. Everything runs fine locally and I am not getting any errors building locally either. I have a .env with all my keys. I have deployed this project successfully before but after adding my AWS s3 bucket key, secret, region and bucket name, it fails at that part of the build. My env vars are in vercel as well and i have checked using the vercel cli. Any help would be great. It's driving me insane lol.
9 Replies
MoltenFuzzy
MoltenFuzzy16mo ago
MoltenFuzzy
MoltenFuzzy16mo ago
error is being thrown from env/server.mjs but im unsure why
MoltenFuzzy
MoltenFuzzy16mo ago
MoltenFuzzy
MoltenFuzzy16mo ago
tried adding SKIP_ENV_VALIDATION=1 to my build command but that didnt work. when it validates later i get the same error
MoltenFuzzy
MoltenFuzzy16mo ago
I may try changing the variable names but those should be fine according to the vercel docs Bump bump again
Tom
Tom16mo ago
im not 100% sure, but i would start by printing the environemtn variables. that ARE there. might give you a good hint
MoltenFuzzy
MoltenFuzzy16mo ago
should i print them during the build step? looks like AWS_BUCKET_NAME is going through perhaps i need to enable something in vercel to allow me to use those specific variable names that appeared to be the case adding TEST to the end of each of them has them show up when i printenv before i build which is weird since vercel does allow the usage of those specific variable names
MoltenFuzzy
MoltenFuzzy16mo ago
AWS_REGION, AWS_ACCESS_KEY_ID, and AWS_SECRET_ACCESS_KEY env variable names dont allow vercel to read them for some reason? i am assuming its because of this. anyways just change the names
MoltenFuzzy
MoltenFuzzy16mo ago
thank you