gen-env-types icon indicating copy to clipboard operation
gen-env-types copied to clipboard

If .env contains PORT and SOMETHINGELSE_PORT, then PORT is not generated as type or example

Open SorenHolstHansen opened this issue 3 years ago • 2 comments

I have a .env file with

# .env
...
REDIS_PORT=12345
PORT=6789
...

but when i run gen-env-types, I get

// env.d.ts
declare namespace NodeJS {
  interface ProcessEnv {
    ...
    REDIS_PORT: string;
    // no PORT
    ...
  }
}

and .env.example

# .env.example
...
REDIS_PORT=
# no PORT=
...

SorenHolstHansen avatar May 20 '21 20:05 SorenHolstHansen

Looks like you named it PORT_ and not PORT.

SatvikR avatar Jun 06 '21 03:06 SatvikR

Updated it now, still causes trouble

SorenHolstHansen avatar Jun 06 '21 18:06 SorenHolstHansen