#Env-Variables
1 messages · Page 1 of 1 (latest)
Hi! There's a section on exposing env variables to the browser here https://nextjs.org/docs/basic-features/environment-variables
For example
NEXT_PUBLIC_ANALYTICS_ID=abcdefghijk
Hi! Thank's for the feedback, but it didn't work.
image google cloud environment variable
function in the next, console.log('keycloak: ', process.env.NEXT_PUBLIC_KEYCLOAK_ID)
Ah, it looks like you need to have the environmental variables set at build time to be included in the client bundle
Are you also building/compiling your project on google cloud? If not try to set the environmental variables (in a .env.local file) where you are running your build command