#Env vars not present in NextJS App
35 messages · Page 1 of 1 (latest)
f7a30355-d5eb-466b-95c4-2513c169a159
I'm not an expert on NextJS, so if I'm doing something wrong just let me know :) I'm not the frontend guy lol
Best to start a new thread since this one was already answered and technically closed
my bad @primal cliff I searched but didn't find it - do you have the link?
A new #1006629907067064482 thread.
isn't this a new thread? 😵💫
Oh dang! My bad! 🤣🤣 reading while working isn’t conducive to helping
lmao
You are not trying to utilize the environment variables during build are you? I’m not too familiar with NextJS. Been messing with it lately, but nothing too major.
I only ask because it’s failing at build, and not deploy
the screenshot I sent is showing an error that occurs when I let the building and deployment up to Nixpacks (idk why it's failing tbh so I decided to keep using my own Dockerfile to build and deploy it) - when I use my own Dockerfile, it builds and deploys without any error, but when I open the browser, env vars weren't loaded
I just set them through Railway
That’s strange. They should be injected into the built container
just in case: this repo doesn't have any .env file
yep, as I said, it only happens with this service, all the other ones are working fine (they're written in Python and Go) - I'm wondering if there's something wrong on the Dockerfile? still, the service is deployed correctly and I can access to it
I hate to do it to you, but have you tried deploying it to a new service, just in case?
I haven't yet. I'll deploy it to a new service without any env var set, to check if at least it shows me the Railway's default ones 🤔
Yeah, if it does, then try adding yours to it
nah, same issue :/
Hmmmm… okay.
I’ll flag the team, hopefully it isn’t a major issue, and it’s just something with your project
hopefully yes!
Flagging this thread. A team member will be with you shortly.
thanks a lot man, you guys are always answering sooo quick, that's really amazing
FUCK I DELETED THE MESSAGE TRYING TO REMOVE A REPEATED SCREENSHOT
no way hahaha
🤦♂️
will rewrite it in the first comment, my bad
You need to pass them in via ARG.
This is why I don’t use docker files
as I'm scrolling down, in my head I'm like did you define them as ARG's and then I see the team flag and then Angelo said the same thing I was saying in my head
Shush! 🤣🤣 this is why I don’t use dockerfile