If you’re using a modern version of Node.js, your package.json may contain two dependencies you no longer need: dotenv and nodemon.

Over the last few Node.js releases, the runtime has introduced native alternatives that simplify development workflows and reduce external dependencies.

Native .env Support

Instead of installing dotenv and adding:

import 'dotenv/config';

or

require('dotenv').config();

you can simply start your application with:

node --env-file=.env app.js

Node.js loads the environment variables before your application starts-no additional package required. It also supports loading multiple environment files and programmatic loading through process.loadEnvFile().

Built-in Watch Mode

The same applies to nodemon.

For many projects, you can simply run:

node --watch app.js

Node.js automatically watches your entry file and imported modules, restarting the process whenever changes are detected. Additional options such as --watch-path and --watch-preserve-output provide even more flexibility for development workflows.

Less Dependencies, Cleaner Projects

While tools like nodemon still offer advanced features, many applications no longer require them. By relying on Node.js built-in capabilities, you can:

  • reduce project dependencies,
  • simplify configuration,
  • speed up onboarding for new developers,
  • keep your development environment closer to the runtime itself.

Sometimes the best dependency is the one you don’t have to install.