Operating Modes
NVM for Windows operates in one of two modes: link or shim. These modes determine how Node.js, dependency managers, and global modules are executed. The operating mode can be switched at any time.
# Easy access
nvm use shim
nvm use link
# Also available in the nvm configuration
nvm cfg set mode=shim
nvm cfg set mode=link
Link Mode
This mode uses links to locate the active system-wide version of node.exe. The link is part of the PATH. Running nvm use changes the target of the link path, not the path itself. PATH never changes.
Link mode offers an experience that is as close as possible to simply running node.exe "as delivered" by nodejs.org. It offers zero latency, but does not provide the advanced modern workflow features available in Shim Mode.
Version 2.0.0 introduced the "fallback" link creation strategy.
Link mode uses an NTFS junction to select the Node.js version.
- NTFS junctions do not need a special privilege.
- NTFS junctions do not support UNC paths such as a network share or a mapped drive.
If Node.js storage uses a UNC path, NVM for Windows creates a symbolic link.
Windows requires the SeCreateSymbolicLinkPrivilege privilege to create that symbolic link.
SeCreateSymbolicLinkPrivilege- A user with administrative rights has this privilege.
- Windows gives this privilege when you enable Windows Developer Mode.
- You can also grant this privilege with Group Policy:
Computer Configuration > Windows Settings > Security Settings > Local Policies > User Rights Assignment > Create symbolic links.
NVM for Windows v2 will not attempt to elevate permissions (i.e. no UAC prompt) on failure of symlink creation. If permissions block the creation of a link, a native desktop notification warns users and offers guidance.
Shim Mode (default)
Shim mode offers a new, streamlined developer experience. When compared with Link Mode, Shim Mode comes with the benefit of avoiding esoteric permission requirements, but at the cost of a small amount of additional latency (~25-35ms total). This latency is negligible for most use cases. For this reason, Shim Mode is recommended for most users.
Most users won't notice or feel the impact of shim latency, making shim mode recommended for most users.
Shim mode features:
- Auto-use pinned versions via
.nvmrc,.node-version,package.json, or other custom runtime config files. - Auto-install missing versions on
nvm use. (Optional) - Unified package manager mismatch handling.
- Lockdown Node.js/V8 permissions. (Optional) Requires Certified Builds with the Governance add-on.
- Publisher trust: Verifies node.exe publisher to prevent untrusted node.exe swaps.
- Native event logging.
- Unified/configurable cooldown periods across all major package managers (npm/npx/yarn/pnpm/vlt/bun). Community Builds default to off. Certified Builds default to 2 days. Users can change either. Forcing the value from machine policy requires the Governance add-on.
Shim V8 / permission lockdown (EnforcePermissionModel, FreezeV8GlobalObjects, DisableEvalAndStringExecution) is a Governance feature. Package-manager cooldown is not. Governance can force the cooldown from machine policy. See registry policy and Choosing a Build.
Windows has a "universal latency tax". It uses CreateProcessW to launch any executable. This tax is paid when the shim is launched and again when the shim runs node.exe. On average, CreateProcessW takes 15ms. The shim adds 1-3ms to identify the desired Node.js version and securely relay the command.
15ms (shim CreateProcessW) + 3ms (shim logic) + 15ms (shim CreateProcessW) = 33ms
Comparison
| Link | Shim | |
|---|---|---|
| Latency1 | 0ms | 25-35ms |
| System Version | ✔️ | ✔️ |
Automatic Installation (nvm use --install) | ✔️ | ✔️ |
| Automatic version detection | ❌ | ✔️ |
| Auto-install missing detected version | ❌ | ✔️ |
One-shot version override (--nvm-use) | ❌ | ✔️ |
| Signed / verified package manager shims | ❌ | ✔️ |
| Signed /verified module shims | ❌ | ✔️ |
Per-launch node.exe publisher trust | ❌ | ✔️ |
| Malicious package blocking | ❌ | ✔️ |
| Module and trust firewall | ❌ | ✔️ |
| Package manager mismatch handling | ❌ | ✔️ |
| Node.js / V8 permission lockdown | ❌ | ✔️ Governance |
| Package manager cooldown | ❌ | ✔️ |
| Per-command execution logging | ❌ | ✔️ |
| Special Permissions | SeCreateSymbolicLinkPrivilegefor UNC path symlinks | None |