A Visual Studio Code extension that displays the Node.js version from .nvmrc or .node-version files in the status bar and allows easy switching between versions using nvm or fnm.
- 🔍 Automatic Detection: Automatically detects Node.js version from
.nvmrcand.node-versionfiles - 📊 Status Bar Display: Shows the current Node version in the VS Code status bar
- 🔄 Auto-refresh: Automatically updates when version files change
- ⚡ Multiple Workspace Support: Supports multiple workspace folders
- 🎯 Quick Switch: Click the status bar to switch Node versions using nvm or fnm
- 📁 Deep Scanning: Recursively scans subdirectories for version files
- ➕ Create Version Files: Create
.nvmrcor.node-versionfiles when none exist - 🛠️ Smart Integration: Automatically detects whether you have nvm or fnm installed
The extension scans your workspace for .nvmrc and .node-version files and:
- File Detection: Looks for
.nvmrcor.node-versionfiles in your workspace - Version Parsing: Extracts Node.js version from the file content
- Status Display: Shows the version in the status bar with a Node.js icon
- Version Management: Allows switching to the specified version using your installed version manager
- Semantic versions:
18.17.0,v20.5.1 - Major versions:
18(expands to18.0.0) - Major.minor:
18.16(expands to18.16.0) - LTS versions:
lts,lts/hydrogen,lts/gallium - Keywords:
stable,latest,current - Pre-release:
19.0.0-alpha.1,18.0.0-rc.2
- Open a project with a
.nvmrcor.node-versionfile - Check the status bar - the Node version will appear automatically
- Click the status bar item to switch to that Node version
- Use Command Palette - Search for "Refresh Node Version" or "Switch Node Version"
If your project doesn't have a .nvmrc or .node-version file:
- Status bar shows "Create" - Click to create a version file
- Use Command Palette - Search for "Create Version File"
- Choose file type - Select
.nvmrcor.node-version - Enter Node version - Specify the version (e.g.,
18.17.0,lts,latest) - Select workspace - Choose where to create the file (if multiple workspaces)
The extension validates your input and creates the file in the appropriate location.
Create a .nvmrc file in your project root:
18.17.0
Or create a .node-version file:
20.5.1
The extension works with both nvm and fnm:
- nvm: Traditional Node Version Manager
- fnm: Fast Node Manager (Rust-based)
The extension automatically detects which one you have installed and uses it accordingly.
- Visual Studio Code 1.74.0 or higher
- Node.js 18.0.0 or higher
- At least one of the following Node version managers:
This extension doesn't contribute any VS Code settings. It works out of the box!
| Command | Description |
|---|---|
Node Version Pal: Refresh Node Version |
Manually refresh the Node version detection |
Node Version Pal: Switch Node Version |
Switch to the Node version specified in version files |
Node Version Pal: Create Version File |
Create a new .nvmrc or .node-version file when none exists |
- Open VS Code
- Go to Extensions (Ctrl+Shift+X / Cmd+Shift+X)
- Search for "Node Version Pal"
- Click Install
Or install from the VS Code Marketplace.
.nvmrc- Traditional nvm version file.node-version- Alternative Node version file format
# .nvmrc
18.17.0
# .nvmrc
lts/hydrogen
# .node-version
20
- Ensure you have a
.nvmrcor.node-versionfile in your workspace - Check that the version file contains a valid Node.js version
- Try refreshing with "Refresh Node Version" command
- Make sure you have either nvm or fnm installed
- For nvm users on macOS/Linux: ensure nvm is properly sourced in your shell
- For fnm users: ensure fnm is in your system PATH
- Check that your version manager can access the specified Node version
- Try installing the version manually:
nvm install 18.17.0orfnm install 18.17.0 - Ensure you have the necessary permissions to switch Node versions
- The extension relies on
.nvmrcor.node-versionfiles to detect Node versions - Version switching requires a terminal - the extension opens a terminal to execute commands
See CHANGELOG.md for details.
This project is licensed under the MIT License - see the LICENSE file for details.
- nvm - Node Version Manager
- fnm - Fast Node Manager
- SPFx Version Pal - Similar extension for SharePoint Framework
Made with ❤️ for developers