Had the same problem. I had Node 11.13.0 installed. First I updated node by Windows installer to 12.15.0, but node --version still returned 11.13.0. Installed nvm, it detected 11.13.0 and asked if it should be managed by nvm (responded with Yes). Installed 12.15.0 by doing nvm install 12.15.0 and nvm use 12.15.0. After that above error occurred.
Executing the command nodist gave the following output:
(x64)
No builds installed, yet.
Which led me to believe that nvm uses nodist, but nodist doesn't know about both 11.13.0 and 12.15.0.
To fix it I simply did the following:
- Uninstall the manually installed 12.15.0 (Windows uninstaller)
- Execute
nvm uninstall 11.13.0 (resulted in failure: asked me to manually remove the folder in the nodist directory, which I did)
- Execute
nodist 12.15.0 to install node 12.15.0 again via nodist.
- Execute
nodist use 12.15.0 to use this version.
Problem solved! Here are the complete logs.
C:\Users\name>nvm install 12.15.0
Downloading node.js version 12.15.0 (64-bit)...
Complete
Creating C:\Users\name\AppData\Roaming\nvm\temp
Downloading npm version 6.13.4... Complete
Installing npm v6.13.4...
Installation complete. If you want to use this version, type
nvm use 12.15.0
C:\Users\name>nvm use 12.15.0
[...]
C:\Users\name>node --version
Sorry, there's a problem with nodist. Couldn't resolve version spec %s: %s 11.13.0 Couldn't find any matching version
C:\Users\name>nodist
(x64)
No builds installed, yet.
C:\Users\name>nvm
Running version 1.1.7.
[...]
Continued in Powershell:
PS C:\Windows\system32> nodist 12.15.0
12.15.0
Installing 12.15.0
12.15.0 [===============] 28127/28127 KiB 100% 0.0s
Installation successful.
PS C:\Windows\system32> nodist use 12.15.0
12.15.0
12.15.0
PS C:\Windows\system32> node --version
v12.15.0