title: NestJS env variable undefined
body: <p>I'm trying to set configuration variables on my project using the <a href="https://docs.nestjs.com/techniques/configuration" rel="noreferrer">official documentation</a>.</p>
  
  <p>I added the following line to my app.module.ts imports:</p>
  
  <pre><code>ConfigModule.forRoot({
    isGlobal: true
  }),
  </code></pre>
  
  <p>I created a .env file at the root of my project with the following content:</p>
  
  <pre><code>MY_VARIABLE=myself
  </code></pre>
  
  <p>And I use dependecy injection to get access to the configuration service:</p>
  
  <pre><code>constructor(private configService: ConfigService) {}
  </code></pre>
  
  <p>However the following line logs 'Env variable: undefined'</p>
  
  <pre><code>console.log('Env variable: ', this.configService.get&lt;any&gt;('MY_VARIABLE'));
  </code></pre>