Env variables not working

Hey,

Our env variables are not being picked up. We have tried the following:

  1. set them in the vercel UI, then fetch them with process.env.MY_ENV_VAR.

When that failed, we tried

  1. set them in the UI, then import and export them in config.next.mjs, according to these guidelines: next.config.js Options: Runtime Config | Next.js

When that failed we tried asking Claude, and the Help chat function. But there were no suggestions from them that were different to what we tried.

Would need a bit of guidelines…

Seems to stem from a lack of understanding between shared and normal environment variables, and the fact that the former have to be linked.

2 Likes

Hey, @siavoshzarrasvand!

Thanks for coming here after your tweet and sharing a solution! :raised_hands:

2 Likes

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.