{"id":2130,"date":"2022-01-01T21:19:11","date_gmt":"2022-01-01T20:19:11","guid":{"rendered":"https:\/\/blog.kodono.info\/wordpress\/?p=2130"},"modified":"2022-01-01T21:19:11","modified_gmt":"2022-01-01T20:19:11","slug":"portable-version-of-nodejs-on-windows","status":"publish","type":"post","link":"https:\/\/blog.kodono.info\/wordpress\/2022\/01\/01\/portable-version-of-nodejs-on-windows\/","title":{"rendered":"Portable version of NodeJS on Windows"},"content":{"rendered":"<p>(This is a corrected version of this <a href=\"https:\/\/dev.to\/yougotwill\/portable-nodejs-without-administrator-access-1elk\">blog post<\/a>)<\/p>\n<ol>\n<li>Install <a href=\"https:\/\/cmder.net\/\">Cmder<\/a> in your desired location.<\/li>\n<li>Download <code>nvm-noinstall.zip<\/code> from the <a href=\"https:\/\/github.com\/coreybutler\/nvm-windows\/releases\/latest\">latest release<\/a>.<\/li>\n<li>Extract the contents of <code>nvm-noinstall.zip<\/code> (i.e.: <code>nvm.exe<\/code> \u2026) into the <code>bin<\/code> folder inside of the portable Cmder folder.<\/li>\n<li>Navigate to the <code>bin<\/code>.<\/li>\n<li>Create a new file called <code>install_fix.cmd<\/code> that contains <a href=\"https:\/\/gist.github.com\/Aymkdn\/c02b50e7ed98e19add3ce5af0a40ee78\">this code<\/a>.<\/li>\n<li>Open a terminal in the <code>bin<\/code> folder and type <code>.\\install_fix.cmd<\/code><\/li>\n<li>When asked to enter the path use the full path to your Cmder <code>bin<\/code> folder.<\/li>\n<li>If it worked, a file called <code>settings.txt<\/code> has been created in the your Cmder <code>bin<\/code> folder.<\/li>\n<li>Close the terminal, and reopen it in the <code>bin<\/code> folder.<\/li>\n<li>Install the version of Node you want, e.g. <code>nvm install latest<\/code>.<\/li>\n<li>Wait until the installation is completed, then, inside the <code>bin<\/code> folder, there should be a new folder containing the latest Node version (e.g. <code>v17.3.0<\/code>).<\/li>\n<\/ol>\n<p>From there, you can use the full path to your Cmder <code>bin<\/code> + the Node version folder + <code>node.exe<\/code> to execute something with this version of Node using Powershell, CMD or other terminal.<\/p>\n<p>For example:<\/p>\n<pre class=\"brush: powershell\">\r\nPS D:\\experiments\\my-stuff\\> D:\\experiments\\nodejs-portable\\cmder_mini\\bin\\v17.3.0\\node.exe index.js\r\n<\/pre>\n<p>You could use Cmder with the Node path in the Startup Settings of the app; e.g. <code>set \"PATH=D:\\experiments\\nodejs-portable\\cmder_mini\\bin\\v17.3.0;%PATH%\"<\/code>. This way, in Cmder, when typing <code>node.exe<\/code> it&#8217;s the portable version that will be used.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>(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 \u2026) into the bin 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 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_coblocks_attr":"","_coblocks_dimensions":"","_coblocks_responsive_height":"","_coblocks_accordion_ie_support":"","hide_page_title":"","footnotes":""},"categories":[7,15,170],"tags":[147,153,123],"class_list":["post-2130","post","type-post","status-publish","format-standard","hentry","category-application","category-astuce","category-english","tag-application","tag-astuce","tag-english"],"_links":{"self":[{"href":"https:\/\/blog.kodono.info\/wordpress\/wp-json\/wp\/v2\/posts\/2130","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.kodono.info\/wordpress\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.kodono.info\/wordpress\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.kodono.info\/wordpress\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.kodono.info\/wordpress\/wp-json\/wp\/v2\/comments?post=2130"}],"version-history":[{"count":3,"href":"https:\/\/blog.kodono.info\/wordpress\/wp-json\/wp\/v2\/posts\/2130\/revisions"}],"predecessor-version":[{"id":2133,"href":"https:\/\/blog.kodono.info\/wordpress\/wp-json\/wp\/v2\/posts\/2130\/revisions\/2133"}],"wp:attachment":[{"href":"https:\/\/blog.kodono.info\/wordpress\/wp-json\/wp\/v2\/media?parent=2130"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.kodono.info\/wordpress\/wp-json\/wp\/v2\/categories?post=2130"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.kodono.info\/wordpress\/wp-json\/wp\/v2\/tags?post=2130"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}