Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

298
Views
dotenv: command not found in nestjs project

I am working on a NestJS project. I am trying to start project but I am getting error: dotenv: command not found in the terminal. I have checked the packages.json and I can see to dotenv installed. Moreover I have tried to install dotenv with Yarn but still I am getting same error.

Dependencies in package.json:

"dependencies": {
    "@nestjs/common": "^8.1.1",
    "@nestjs/config": "1.0.2",
    "@nestjs/core": "^8.1.1",
    "@nestjs/jwt": "^8.0.0",
    "@nestjs/passport": "^8.0.1",
    "@nestjs/platform-express": "^8.1.1",
    "@nestjs/swagger": "^5.1.2",
    "@prisma/client": "3.3.0",
    "bcrypt": "^5.0.1",
    "class-transformer": "^0.4.0",
    "class-validator": "^0.13.1",
->  "dotenv": "^10.0.0",
    "express-rate-limit": "^5.5.0",
    "helmet": "^4.6.0",
    "nanoid": "^3.1.30",
    "nodemailer": "^6.7.0",
    "passport": "^0.5.0",
    "passport-jwt": "^4.0.0",
    "reflect-metadata": "^0.1.12",
    "request-ip": "^2.1.3",
    "rimraf": "^3.0.2",
    "rxjs": "^7.4.0",
    "swagger-ui-express": "^4.1.4"

},

The starting script that I am using:

"start:dev": "dotenv -e env/local.env -- nest start --watch",
about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

I found the solution and it may help someone else. To run dotenv command in terminal we need dotenv-cli. Installing dotenv-cli with yarn add dotenv-cli solved my problem.

about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!