Environment variable does not exist error

Environment Variable “MONGO_URI” references Secret “MONGO_URI”, which does not exist.

I have been having this issue for every commit i make, despite having the secret well provided in my environment variable

no commit i make deploys anymore. i have even made a new repository with no luck still.

I am having similar issues as well. I have tried everything I can. Including creating a fresh repository for the project and have no luck yet. Please guys, help look into this.

project runs very well in my local machine but refuses to run in vercel. I kept getting this error for every new commit, including the new repository:

Environment Variable “MONGO_URI” references Secret “MONGO_URI”, which does not exist.

Hello,

Can you confirm your Project settings has MONGO_URI Env variable present?

Hello Swarnava, Thank you for your swift response. took a break earlier.

yes it does. I have all my environment variable well set. I have even created a new repository entirely and created new environment variable with all the variable.

I have also created a new deployments only the last successful deploy persists, others keeps failing no matter the tweak i have made. see the image below:

This is the environment variable settings for production for the project. I really don’t understand why subsequent commits will not deploy, giving the said error.

Based on the error logs, it seems that your project is utilizing legacy secrets. It is possible that your project is using vercel.json file which has the secrets defined. Since you already added the Environment variables in the Dashboard, could you please remove any secrets from the vercel.json file and check if it resolves the issue? For more detailed information, you can refer to this guide: Configuring projects with vercel.json

Voula…

Thanks so much, Swarvana… you just ended my over 36 hours of trial and error…

the saying that a mentor shortens your journey is indeed true.

Thanks so much once again.

2 Likes

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