Using a custom installation path for node #1128
-
I'm working with a project that comes with a very specific installation and set of requirements for Node, and I'd like to add their NodeJS installation to nvm in order to be able to switch seamlessly. I have tried naively copying/symlinking the directory to Is there any way to link it to a custom installation? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 4 replies
-
There's no special registry. NVM4W reads the |
Beta Was this translation helpful? Give feedback.
-
Just had the epiphany that I can just name the folder v1.1.1 or some other magic number to have a good alias |
Beta Was this translation helpful? Give feedback.
There's no special registry. NVM4W reads the
NVM_HOME
directory, identifying node versions named with thevX.X.X
pattern. If you want to install a specific version w/o usingnvm install
, just drop the appropriately named folder intoNVM_HOME
. As for creating the symlink, I'd recommend usingnvm use ...
, but if you really want to do it on your own, use mklink to update the symlink target ofNVM_SYMLINK
. This is how NVM4W does it behind the scenes, with the major difference being NVM4W automatically attempts to elevate the command, leverage UAC prompts when necessary, etc.