Skip to content

Latest commit

 

History

History
50 lines (39 loc) · 1.34 KB

File metadata and controls

50 lines (39 loc) · 1.34 KB
title fast-node-manager
description A reference page for the fast-node-manager resource

import { Step, Steps } from 'fumadocs-ui/components/steps';

The fast-node-manager resource installs fnm — a fast, cross-platform Node.js version manager built in Rust. fnm lets you install and switch between multiple Node.js versions and respects .nvmrc and .node-version files.

Parameters

  • nodeVersions: (array[string]) Node.js versions to install. Supports partial semver ("20"), exact versions ("20.18.0"), and aliases ("lts", "latest").

  • defaultVersion: (string) The global default Node.js version set via fnm default.

Example usage

[
  {
    "type": "fnm",
    "nodeVersions": ["20", "18"],
    "defaultVersion": "20"
  }
]

Setting up Node.js with fnm

Create a `codify.json` file anywhere. Open `codify.json` and paste in the following config.
[
  {
    "type": "fnm",
    "nodeVersions": ["lts"],
    "defaultVersion": "lts"
  }
]
Run `codify apply` in the directory of the file. Open a new terminal and run `node -v` — the installed LTS version should be returned. Node.js is now managed by fnm.
codify apply