#NEXTJS 12 + RAILWAY - Env vars in browser are undefined!
5 messages · Page 1 of 1 (latest)
I think .env.local gets overridden by .env or .env.production when it's a production build.
Do you also have a .env file
5 messages · Page 1 of 1 (latest)
Hey guys, I have an .env.local with NEXT_PUBLIC_API_URL and It works fine in local. But when I deploy in railway and I add the variable in railway just like in local file it returns undefined..
Just asking in case someone already struggled with this aswell
I think .env.local gets overridden by .env or .env.production when it's a production build.
Do you also have a .env file