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•2y 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
kyra
kyra•2y 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•2y ago
Do you actually have a file named .env in your src directory though?
kyra
kyra•2y ago
yes thats where my token is stored token works fine oh wait works fine now
Favna
Favna•2y 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 💀
kyra
kyra•2y ago
No i just restart 3 times js ig 💀