Search code examples
node.jsnvm

Unable to downgrade Node.js using nvm on Windows


I'm trying to downgrade Node's version via nvm on Windows 10, but I can't get it working:

C:\projects>nvm use 16.13.2 all
Now using node v16.13.2 (64-bit)

C:\projects>node -v
v17.4.0

(I nvm install and nvm use 16.13.2 on both 32 and 64bit; also tried to restart the command prompt, but always showing v17.4.0)


Solution

  • According to your output of where node

    C:\Program Files\nodejs\node.exe
    

    You have another manually installed node version on your system. Since both, the manually installed node as well as the version provided by NVM have their locations in your PATH environment variable, the one which happens to come first in PATH wins (which in your case was the manually installed one) and the other one looses and won't be accessible (without using the full path).

    So to fix it, uninstall node and use NVM to handle all node installations.