How to use skyra env utilities with the cli generated project?

I want to use env variables to store my mongo uri, but due to skyra utilities being their i cant use dotenv How am i supposed to use it?
MONGO=URI
MONGO=URI
6 Replies
Favna
Favna•16mo ago
@Skyra/env-utilities is a small wrapper around dotenv-cra, dotenv-expand and dotenv. You use it exactly like you have it there, or use the utility methods of envParseString and such
Mrm Mia
Mrm Mia•16mo ago
the thing, without changing any code, eg: not adding the mongo: string in setup.ts, and using process.env.MONGO returns undefined and still using it like shown above i still get undefined
Favna
Favna•16mo ago
Do you actually have a file named .env in your src directory though?
Mrm Mia
Mrm Mia•16mo ago
yes thats where my token is stored token works fine oh wait works fine now
Favna
Favna•16mo ago
Idk then. Verify all your code and all your files more thoroughly, make sure casing is correct, log the entire process.env to find any issues Did you just not rebuild or something 💀
Mrm Mia
Mrm Mia•16mo ago
No i just restart 3 times js ig 💀