Next.js Discord

Discord Forum

Upload to vercel says. Failed to load next.config.js. invalid environment variables.

Answered
Dwarf Hotot posted this in #help-forum
Open in Discord
Avatar
Dwarf HototOP
Does anyone know how to fix the errors listed in the title? I tried every fix in the book and the exact same error is happening even the ci = false hack in the settings. Anyone encountered this pesky problem?
Answered by joulev
Hmm remove the surrounding "
View full answer

20 Replies

Avatar
Dwarf HototOP
its a t3 app yes. So heres a screenshot of my error and heres my directory, env.mjs (yes mjs, vercel error log and claude 3.5 suggested i change the name) file, and my next config.
Image
Image
Image
Image
Avatar
Dwarf HototOP
no it doesnt at all
Avatar
@Dwarf Hotot no it doesnt at all
Avatar
Are the environment variables exact same in local and on Vercel?
Avatar
Dwarf HototOP
yes look ill show you.
i literally copy pasted from my vs code
Image
Image
everything is perfectly fine when i npm run dev
Avatar
@Dwarf Hotot i literally copy pasted from my vs code
Avatar
Hmm remove the surrounding "
Answer
Avatar
But that’s the only thing that can possibly affect anything here, everything else looks good
Avatar
Dwarf HototOP
ahhh now were getting something different
Image
Image
have you seen this before?
Avatar
That looks like an eslint error, you misconfigured eslint. That much I know, how to fix it I don’t know
Avatar
Dwarf HototOP
apparently someone said this in answer overflow when i just looked it up,
Image
only thing is ive never touched es lintrc. do you know where that would be? not in node modules right?
I'm still getting used to next and t3
Avatar
@joulev Hmm remove the surrounding "
Avatar
Dwarf HototOP
btw thanks for suggesting this. I would have been going around in circles for far too much longer
Avatar
Dwarf HototOP
well fam. It deploys perfectly now
best blessings from christ the most high to you
Avatar
nice to hear it's working