Last active
April 30, 2024 17:50
-
-
Save xyberviri/7ab7cf8d34e93d98a662be3ad919699f to your computer and use it in GitHub Desktop.
node.js portable
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
For windows download the latest `node-X.X.X-win-x64.7z` from the nodejs site https://nodejs.org/dist/latest/ | |
go to the folder and run `nodevars.bat` | |
next run `npm install npm@latest` | |
and your done... | |
you now have a updated nodejs until you logout, then you just go back and run `nodevars.bat` the next time you need it. | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I have been informed that this will put a node_modules folder in your user profile location, to put these modules on a thumb / other folder do the following:
Set the thumb drive letter to something that will NOT change between systems like P otherwise stuff breaks
extract the zip files to that drive in the location you want node.js like before im going to assume P:\node-v22.0.0-win-x64\
edit the 4th line of nodevars.bat from set "PATH=%APPDATA%\npm;%~dp0;%PATH%" to set "PATH=%~dp0;%PATH%"
then open a new command prompt and type cd /d P:\node-v22.0.0-win-x64\
then npm install npm@latest that should throw everything into P:\node-v22.0.0-win-x64\ i have zero clue what the repercussions of doing this are but stuff seems to work.
when you open a command prompt and type P:\node-v22.0.0-win-x64\nodevars.bat it should add P:\node-v22.0.0-win-x64\ to your systems %PATH% for that command prompt session.