(This is a corrected version of this blog post)
- Install Cmder in your desired location.
- Download
nvm-noinstall.zip
from the latest release. - Extract the contents of
nvm-noinstall.zip
(i.e.:nvm.exe
…) into thebin
folder inside of the portable Cmder folder. - Navigate to the
bin
. - Create a new file called
install_fix.cmd
that contains this code. - Open a terminal in the
bin
folder and type.\install_fix.cmd
- When asked to enter the path use the full path to your Cmder
bin
folder. - If it worked, a file called
settings.txt
has been created in the your Cmderbin
folder. - Close the terminal, and reopen it in the
bin
folder. - Install the version of Node you want, e.g.
nvm install latest
. - Wait until the installation is completed, then, inside the
bin
folder, there should be a new folder containing the latest Node version (e.g.v17.3.0
).
From there, you can use the full path to your Cmder bin
+ the Node version folder + node.exe
to execute something with this version of Node using Powershell, CMD or other terminal.
For example:
PS D:\experiments\my-stuff\> D:\experiments\nodejs-portable\cmder_mini\bin\v17.3.0\node.exe index.js
You could use Cmder with the Node path in the Startup Settings of the app; e.g. set "PATH=D:\experiments\nodejs-portable\cmder_mini\bin\v17.3.0;%PATH%"
. This way, in Cmder, when typing node.exe
it’s the portable version that will be used.