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 AssemblyAI tool

Challenge Submission: SpeechCraft - AI-Powered Speech Analysis for Better Communication

SpeechCraft is an advanced real-time speech analytics platform that transforms spoken words into actionable insights. Using cutting-edge AI technology from AssemblyAI, it provides instant transcription while analyzing multiple dimensions of speech performance.

Read full post

Top comments (0)

A Workflow Copilot. Tailored to You.

Pieces.app image

Our desktop app, with its intelligent copilot, streamlines coding by generating snippets, extracting code from screenshots, and accelerating problem-solving.

Read the docs

👋 Kindness is contagious

Dive into an ocean of knowledge with this thought-provoking post, revered deeply within the supportive DEV Community. Developers of all levels are welcome to join and enhance our collective intelligence.

Saying a simple "thank you" can brighten someone's day. Share your gratitude in the comments below!

On DEV, sharing ideas eases our path and fortifies our community connections. Found this helpful? Sending a quick thanks to the author can be profoundly valued.

Okay