Plugins/node

Node Plugin

Official

avm-plugin-node • Precompiled Native Executable

Interactive Tutorial & CLI Demo

Node.js Plugin Walkthrough

Illustrative walkthrough: release versions, output and timings vary by platform and network. Install a JDK before setting up Android.

avm-plugin-node
Interactive CLI
Step 01 of 06:Add Plugin
Execution overhead:0.9s
# Fetch the precompiled native Node.js provider from the marketplace
$

Quick Installation

Install the precompiled standalone executable directly into ~/.avm/plugins/avm-plugin-node:

avm plugin add node
Key Commands
CommandPurposeCopy
avm plugin add nodeInstall native Node.js provider binary
avm node versionsList recent available Node.js releases
avm node 22 versionsFilter versions by major line (e.g. Node 22.x)
avm node install 22.14.0Download and install exact Node version
avm node use 22.14.0Pin Node version for current project in .avm.json
avm node use 22.14.0 --globalSet machine-wide default Node version

Environment Variable Injections

When you run an alias (e.g. avm dev) or call shims directly, the plugin exports the following environment variables:

PATH (via shims)Auto-injected

Scripts and global npm commands

Scripts from the current directory’s package.json are available as aliases. Package-manager detection checks Bun lockfiles, then pnpm-lock.yaml, then yarn.lock, and otherwise uses npm. Explicit project aliases win over discovered scripts.

Global package executables remain reachable through the globally selected Node installation when a project selects another version. Successful package-manager installs regenerate shims; run avm shims install if a command is missing.

Sample Project Configuration (.avm.json)
{
  "tools": {
    "node": "22.14.0"
  },
  "aliases": {
    "dev": "pnpm run dev",
    "build": "pnpm run build"
  }
}

Features & Highlights

  • Live version index fetched straight from nodejs.org/dist/index.json
  • Automatic package.json script aliases (avm test, avm dev, etc.)
  • Global packages (npm -g) stay reachable across local version switches
  • Zero-compile binary fetch for your exact platform architecture
  • SHA-256 verified locked installs with avm lock and avm install --frozen