#load.ts of dotenv module not working
29 messages · Page 1 of 1 (latest)
std
import "https://deno.land/[email protected]/dotenv/load.ts";
console.log('a', Deno.env.get('COLLECTION'));
And i assume your .env file has a line like COLLECTION=asdf?
yes
can't show my dotenv file because it contains sensitive credentials
it doesnt even print a undefined
it just prints a
So COLLECTION might be an empty string
i can print any variable inside my dotenv file
Actually no nevermimd
and it just prints nothing
You can try Deno.env.toObject() i guess
Is the .env file in the same folder as where you run the file?
Maybe you can upgrade to 0.158.0 just in case
hold on even if it would make no sense lemme restart my computer since its pretty bad
ok im there
let me try running this again
still doesnt work
even with toObject
it wont work
changing the version of std
nothing
actually now i even try to use Deno.env.set just for testing and even after i have declared using .set a variable, if i try to print it it just wont
so maybe
its not the load.ts module not working
its the Deno object