So you want to use NodeJS on a portable flash drive?
Or maybe just in a non-restricted directory?
If you are reading this then you may have gone through the following as I have.
Attempted to use NodeJS Portable by Crazy Max which fails due to the company proxy server and not being able to set the proxy before the installation of Node.
Attempted to use NodeJS Portable by Gareth Flowers which installs correctly but the Node version is too outdated to use ReactJS or similar frameworks.
Attempted to use nvm-windows which after following the instructions given in the README doesn't work because
nvm use 13.8.0requires you to enter a username and password for Window's User Account Control.
If you are still reading then here is my working (very hacky) solution to get NodeJS portable!
I used a portable version of Cmder but I imagine any terminal program where you can add to the PATH is fine.
- Install Cmder in your desired location.
nvm-noinstall.zipfrom the latest release.
- Extract the contents of
binfolder inside of the portable Cmder folder.
- Navigate to the
binfolder in Cmder and run
- When asked to enter the absolute path use your Cmder
binfolder. (In my case, for some reason the
settings.txtisn't created in the
binfolder but instead is made at root of my usb i.e.
- Install the version of node you want i.e.
nvm install latest(Make sure to still be inside of the
binfolder in your terminal program).
- Wait until
npmhave finished installing.
- Inside the
binfolder there should be a folder containing the latest node version e.g.
- Copy the absolute path to that folder. e.g.
- Add this to your existing path in Cmder's environment settings. e.g.
- Make sure you are still inside your
nvm use v13.8.0or your chosen node version. You can close the username and password window both times without entering anything. It should tell you
Now using node v13.8.0 (64-bit).
- Close and open Cmder and you should have access to
Let me know if you have any alternative solutions. I would be happy to read them in the comments.
Happy coding! 🥳
P.S. I'd like to start the habit of sharing the music that I am listening to while writing up my posts. Today's music is a part of a set by South African super collector DJ Okapi. Check it out here. https://www.mixcloud.com/radioradioradioradio/dj-okapi-radio-radio/
Big O Notation for beginners!!
Jane Tracy 👩🏽💻 -
Accessibility for the web - why we should use semantic HTML
Silvia Bogdan -
Ryan Ameri -
LocalStorage vs Cookies: All You Need To Know About Storing JWT Tokens Securely in The Front-End
Michelle Wirantono -