How to Fix the NVM for Windows `NVM_SYMLINK` Activation Error

Published: (March 4, 2026 at 06:17 AM EST)
2 min read
Source: Dev.to

Source: Dev.to

Why This Error Happens

When Node.js is installed using the official Windows installer, it creates the directory:

C:\Program Files\nodejs

NVM for Windows uses that same path as a symbolic link (NVM_SYMLINK) to dynamically switch between Node versions. If a physical directory already exists there, NVM cannot override it, and activation fails.

Step-by-Step Fix (Guaranteed Method)

Step 1: Close All Node‑Related Applications

  • Close all terminal windows.
  • Close VS Code or any IDE.
  • Stop any running Node.js applications.

This prevents file‑locking issues.

Step 2: Open Command Prompt as Administrator

  1. Press Start.
  2. Type cmd.
  3. Right‑click → Run as Administrator.

Administrator privileges are required because we are modifying Program Files.

Step 3: Take Ownership of the Directory

Windows may block deletion due to TrustedInstaller permissions.

takeown /f "C:\Program Files\nodejs" /r /d y

Then grant full permissions:

icacls "C:\Program Files\nodejs" /grant %username%:F /t

Step 4: Kill Any Running Node Processes

taskkill /f /im node.exe
taskkill /f /im npm.exe

Step 5: Delete the Existing Node Directory

rmdir /s /q "C:\Program Files\nodejs"

Command flags explained

  • /s – deletes all subdirectories and files.
  • /q – suppresses confirmation prompts.

Still Getting “Access is Denied”?

Open PowerShell as Administrator and run:

Remove-Item "C:\Program Files\nodejs" -Recurse -Force

Fallback Method (If Files Are Locked)

If the directory still refuses to delete:

  1. Restart your system.
  2. Do not open any applications.
  3. Immediately open Command Prompt as Administrator.

Run again:

rmdir /s /q "C:\Program Files\nodejs"

This resolves most background file‑lock issues.

Re‑Enable NVM

Once the directory is removed:

nvm on

Then install and activate a Node version:

nvm install 18
nvm use 18
node -v

You should now see the installed Node version.

Best Practice When Migrating to NVM

If you’re switching from a direct Node installation to NVM:

  • Uninstall Node.js from Control Panel first.
  • Manually verify that C:\Program Files\nodejs is deleted.
  • Then install and configure NVM.

This prevents activation conflicts entirely.

Final Thoughts

The error occurs because NVM relies on symbolic linking, and Windows does not allow it to overwrite an existing physical directory. Following the steps above will completely resolve the NVM_SYMLINK activation error in most Windows environments.

0 views
Back to Blog

Related posts

Read more »

Stop Building API Dashboards From Scratch

Every API developer has been there. You ship an API, someone starts using it, and the questions begin: - “How many requests are we getting?” - “Who’s our heavie...

Run Your Dev Server Without a .env File

The .env Problem Every project has one – a .env file sitting in the project root with database passwords, API keys, and secrets of varying sensitivity. You hav...