I had previously installed Node.js version 20.2.0 directly without utilizing an nvm (Node Version Manager). However, I now desire to incorporate this existing Node.js installation into nvm without the need for reinstalling the same version using nvm. In other words, I want to include the already installed Node.js version into nvm.
I searched on the internet but found nothing.
I had previously installed Node.js version 20.2.0 directly without utilizing an nvm (Node Version Manager). However, I now desire to incorporate this existing Node.js installation into nvm without the need for reinstalling the same version using nvm.
I had the same issue with nvm-windows. In my case, I needed Node.js 8.9.4 for an old program, a new version of Node.js for a new program, and didn't want to risk uninstalling the old version.
C:\Program Files\nodejs
to C:\Program Files\nodejs 8.9.4
C:\Users\<username>\AppData\Roaming\npm
to C:\Users\<username>\AppData\Roaming\npm for Nodejs 8.9.4
. This step may not be necessary.c:\Users\<username>\source\repos>nvm use 8.9.4
Now using node v8.9.4 (64-bit)
c:\Users\<username>\source\repos>node -v
v8.9.4
I changed C:\Users\<username>\AppData\Roaming\npm for Nodejs 8.9.4
back to its original name C:\Users\<username>\AppData\Roaming\npm
I installed Node.js 20.12.2 with nvm install 20.12.2
and told nvm to use it with nvm use 20.12.2
Then I could install all the other things I needed for my new project :-)