79506766

Date: 2025-03-13 14:37:08
Score: 0.5
Natty:
Report link

I just had the same problem. For me the fix was in the main.ts file. I needed to put the dotenv configuration before all the imports of the files that use process.env.

import * as dotenv from 'dotenv';
dotenv.config();

import { NestFactory } from '@nestjs/core';
import { AppModule } from './app.module';
import { ValidationPipe } from '@nestjs/common';
import { ConfigService } from '@nestjs/config';

async function bootstrap() {
...
Reasons:
  • Blacklisted phrase (0.5): I need
  • Has code block (-0.5):
  • Low reputation (0.5):
Posted by: Daniel Lemos de Morais