Skip to content

Node Version Management

In our frontend development environment, we prioritize staying updated with the current version of Node.js rather than the Long Term Support (LTS) version. For efficient management of Node.js versions, we use Fast Node Manager (FNM).

  • Access to Latest Features: Using the current version allows us to leverage the latest features and improvements in Node.js, ensuring our development stack remains modern and efficient.
  • Performance Enhancements: Benefit from the latest performance optimizations in Node.js.

FNM (Fast Node Manager) is a lightweight, fast Node.js version manager, ideal for handling multiple Node.js versions across different projects.

To install FNM, follow these steps:

Terminal window
# Using curl
curl -fsSL https://github.com/Schniz/fnm/raw/master/.ci/install.sh | bash
# Or using wget
wget -qO- https://github.com/Schniz/fnm/raw/master/.ci/install.sh | bash

At the root of each frontend repository, include a .node-version file to specify the required Node.js version. This approach ensures consistency across development environments.

# Example of .node-version content
v20

FNM automatically recognizes this file and switches to the specified Node.js version when navigating into the directory.

Terminal window
fnm use 20

After switching versions, it’s good practice to verify the current Node version:

Terminal window
node --version
  • Considering Bun: We are actively exploring the adoption of Bun for some of our repositories, such as charizard. Bun is a modern JavaScript runtime with a focus on performance and efficiency.
  • Evaluation Phase: The transition to Bun will involve a detailed evaluation to assess its compatibility with our projects and the potential benefits it offers over Node.js.