When I used the dotenv module from the standard library, it worked perfectly fine. However, when I deployed it with Deno, I found out that environment variables were not loading correctly, which resulted in an error. Above, it was recommended to use the Deno.env API instead.
I followed the advice and tried to use it, but it seems like it’s not loading from the .env file.
const uri = Deno.env.get("MONGO_URI");
console.log("URI:", uri); // This returns undefined.
What could be the reason
I wanted to load envs from .env file from Deno.env Api