
TypeScript Beyond Basics
} -->
When working with Node.js projects, you might be tempted to use Docker to containerize your environment right away. Docker is powerful, but sometimes it’s like using a cannon to kill a fly.
In many cases, nvm (Node Version Manager) is a much simpler, faster, and more convenient solution - especially during day-to-day development.
nvm stands for Node Version Manager. It’s a command-line tool that allows you to install, manage, and switch between multiple Node.js versions on your local machine effortlessly.
This flexibility is crucial because different projects often require different Node versions. Instead of globally installing one Node version and risking compatibility issues, nvm lets you isolate environments per project or per terminal session.
You can easily switch Node versions with a simple command like:
nvm use 16
or install new versions on the fly:
nvm install 18
It works cross-platform (mostly on Unix-like systems; for Windows there’s nvm-windows), and integrates well with your existing workflow and editors.
For most developers working on Node.js apps locally, nvm covers 90% of the needs without any extra overhead.
Because it runs directly on your machine, nvm:
This means you can focus on coding rather than infrastructure - which is the whole point during development.
Docker is a fantastic tool, especially when you need to:
However, sometimes you just want something even simpler - a tool that works instantly with a single terminal command, no container setup, no extra layers.
For simple cases like switching Node versions or running a local dev server for one app, spinning up a Docker container can:
In these situations, nvm shines as a lightweight, fast, and zero-config solution that gets you coding immediately.
My personal recommendation is:
This way you get the best of both worlds: speed and simplicity in dev, and consistency and isolation in production.
Before jumping to Docker for every Node.js project, pause and ask yourself: Do I really need a container right now?
Most of the time, nvm provides everything you need to manage Node versions and develop efficiently - quickly, simply, and without overhead.
Sometimes, a fly just needs a gentle swat - no cannon required.
Bartłomiej Nowak
Programmer
Programmer focused on performance, simplicity, and good architecture. I enjoy working with modern JavaScript, TypeScript, and backend logic — building tools that scale and make sense.