motdotla / dotenv

Loads environment variables from .env for nodejs projects.
https://www.dotenvx.com
BSD 2-Clause "Simplified" License
19.01k stars 853 forks source link

Type error on dotenv.register() #837

Closed EphraimB closed 1 month ago

EphraimB commented 1 month ago

I'm getting a type error on dotenv.register. I'm using mikro-orm and the v6 update doesn't load the env variables anymore and it says to load the env variables manually by doing dotenv.register but it gives me a type error.

motdotla commented 1 month ago

there is no register() function, nor do I think there ever has been.

some orms and frameworks do some modifications on top of dotenv. maybe they are referring to their own.

otherwise, you can always try dotenvx - which works everywhere and has better debug tooling via dotenvx run --debug