DEV Community

Cover image for How I Manage Node & Package Manager Versions in 2025
Michal Bryxí
Michal Bryxí

Posted on

1

How I Manage Node & Package Manager Versions in 2025

Some time has passed since I wrote How I Manage Node & Package Manager Versions in 2024 and few things have changed. So let's see what has changed and what are still goals:

  1. Things works seamlessly. I switch projects = correct (versions) of tools are automatically used.
  2. Minimal process to setup new projects is needed.
  3. Local development environment and CI use the same ways to ensure consistency.

My stack of choice is node and pnpm, but this should work for most commonly used tools.

In the past I've used nvm, n, volta, corepack, nodeenv. While they all have their own strength, I converged to using proto as the tool of choice.

Installation

  1. If possible, remove all previously versions of node or pnpm to make sure no conflicts occur.
  2. Install proto:
> brew install proto
> proto setup
Enter fullscreen mode Exit fullscreen mode

Project setup

Once you're in your my-app directory, run:

> proto pin node 20.18.0
> proto pin pnpm 9.14.2
Enter fullscreen mode Exit fullscreen mode

It will create my-app/.prototools file with equivalent content, which can be commited to the repo to ensure that every single machine uses the same tool versions when running my-app:

node = "20.18.0"
pnpm = "9.14.2"
Enter fullscreen mode Exit fullscreen mode

And this setup will be automatically honoured every time you run node or pnpm commands inside your project directory:

> node --version
v20.18.0

> pnpm --version
9.14.2
Enter fullscreen mode Exit fullscreen mode

Image of Datadog

Create and maintain end-to-end frontend tests

Learn best practices on creating frontend tests, testing on-premise apps, integrating tests into your CI/CD pipeline, and using Datadog’s testing tunnel.

Download The Guide

Top comments (0)

Image of Datadog

The Essential Toolkit for Front-end Developers

Take a user-centric approach to front-end monitoring that evolves alongside increasingly complex frameworks and single-page applications.

Get The Kit

👋 Kindness is contagious

Immerse yourself in a wealth of knowledge with this piece, supported by the inclusive DEV Community—every developer, no matter where they are in their journey, is invited to contribute to our collective wisdom.

A simple “thank you” goes a long way—express your gratitude below in the comments!

Gathering insights enriches our journey on DEV and fortifies our community ties. Did you find this article valuable? Taking a moment to thank the author can have a significant impact.

Okay