Note
This article has been migrated from the old blog system. Formatting and external resources may be broken, and please note the content’s timeliness.
Main Content
Exploring NodeJS: A Standalone Development Environment in a USB Drive
Create a BAT script in the directory where you want to set up the portable NodeJS environment and input the following content:
(Remember to change the file extension when saving.)
|
|
After saving the script, download the latest version of NodeJS from the Official NodeJS Website, making sure to select the ZIP format.
Note: Choose Other Downloads
;
Download the ZIP package according to your system architecture (32-bit or 64-bit).
After downloading, extract the files and ensure node.exe
from the ZIP is in the same directory as the BAT script you created earlier.
Run the BAT script you wrote earlier to enter the portable NodeJS environment.
In this environment, installing/uninstalling packages with NPM will not affect the existing NodeJS installation on your system.
Storing it in a USB drive allows you to carry a portable development environment with you—very convenient!