Node js portable windows

Node js portable windows

Node.js portable on Windows

Use Git or checkout with SVN using the web URL.

Work fast with our official CLI. Learn more.

Launching GitHub Desktop

If nothing happens, download GitHub Desktop and try again.

Launching GitHub Desktop

If nothing happens, download GitHub Desktop and try again.

Launching Xcode

If nothing happens, download Xcode and try again.

Launching Visual Studio

Latest commit

Git stats

Files

Failed to load latest commit information.

README.md

For more portable applications, checkout Portapps !


Read this in other languages: English, 简体中文.

A single EXE written in Go to make Node.js portable on Windows systems.
Tested on Windows 7, Windows 8.1 and Windows 10.

Main window of Node.js Portable

Configuration file nodejs-portable.conf is generated at first launch:

  • Download the latest release.
  • Put nodejs-portable.exe in a new empty folder.

Run nodejs-portable.exe , then choose task:

  • 1 to install node.js by entering version and architecture.
  • 2 to launch Node.js shell.

If you have already installed Node.js, create a folder named app and put your node.js environment inside, then launch nodejs-portable.exe . (See #35)

Config file nodejs-portable.conf

  • workPath : Shell working dir (can be relative to nodejs-portable.exe ).
  • customPaths : Array of custom paths that will be placed in the PATH environment variable (paths can be relative to nodejs-portable.exe ).
  • immediateMode : Set this to true if you want to use node shell immediately.
  • shell : Shell to be used. Can be cmd (default) or powershell .

If an exception happened, take a look into nodejs-portable.log for further information.

Node.js Portable can be used through the command line to inject arguments directly to node:

Take a look into nodejs-portable.log if you have any issue.

  • Install Go 1.12+
  • Add Go to your PATH (ex. C:\Go\bin )
  • Install latest version of Mage
  • Add Mage to your PATH
  • Clone this repository
  • Run mage build inside. The artifact will be available in bin

All kinds of contributions are welcome 🙌 ! The most basic way to show your support is to star 🌟 the project, or to raise issues 💬 You can also support this project by becoming a sponsor on GitHub 👏 or by making a Paypal donation to ensure this journey continues indefinitely! 🚀

Thanks again for your support, it is much appreciated! 🙏

MIT. See LICENSE for more details.
USB icon credit to Dakirby309.

Portable NodeJS without administrator access

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.

Читайте также:  What is reverse shell in linux

Attempted to use nvm-windows which after following the instructions given in the README doesn’t work because nvm use 13.8.0 requires 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.

  1. Install Cmder in your desired location.
  2. Download nvm-noinstall.zip from the latest release.
  3. Extract the contents of nvm-noinstall.zip into the bin folder inside of the portable Cmder folder.
  4. Navigate to the bin folder in Cmder and run install.md
  5. When asked to enter the absolute path use your Cmder bin folder. (In my case, for some reason the settings.txt isn’t created in the bin folder but instead is made at root of my usb i.e. E:/ ).
  6. Install the version of node you want i.e. nvm install latest (Make sure to still be inside of the bin folder in your terminal program).
  7. Wait until node and npm have finished installing.
  8. Inside the bin folder there should be a folder containing the latest node version e.g. v13.8.0 .
  9. Copy the absolute path to that folder. e.g. E:\PortableApps\CmderPortable\bin\v13.8.0 .
  10. Add this to your existing path in Cmder’s environment settings. e.g. set «PATH=E:\PortableApps\CmderPortable\bin\v13.8.0;%PATH%»
  11. Make sure you are still inside your bin folder. Run nvm use v13.8.0 or 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) .
  12. Close and open Cmder and you should have access to node , npm and npx 😄.

I have also posted this information on the nvm-windows issue requesting for a portable version #363

Let me know if you have any alternative solutions. I would be happy to read them in the comments.

massahud / Portable Node.js andNPM on windows.md

Now you can use npm and node from windows cmd or from bash shell like Git Bash of msysgit.

This comment has been minimized.

Copy link Quote reply

gaurav21r commented Feb 16, 2016

npm packages are really old, we are at 3.0+ but site http://nodejs.org/dist/npm/ is only at 1.4.9

This comment has been minimized.

Copy link Quote reply

fluffgfx commented Feb 19, 2016

For more up-to-date npm use https://registry.npmjs.org/npm/-/npm-.tgz. Latest version as of this writing is 3.7.3 — so use https://registry.npmjs.org/npm/-/npm-3.7.3.tgz and use 7Zip or whatever to unzip it.

This comment has been minimized.

Copy link Quote reply

rahilwazir commented Mar 13, 2016

This comment has been minimized.

Copy link Quote reply

a-teammate commented May 23, 2016

This is only portable as long as you have git in your PATH

This comment has been minimized.

Copy link Quote reply

jorgeas80 commented Sep 11, 2016

This comment has been minimized.

Copy link Quote reply

s-h-a-d-o-w commented Oct 5, 2016

This is actually a great guide but the comments may unnecessarily confuse people looking at this.

a) It doesn’t matter whether npm is out of date, that’s why it says «npm install -g npm». As of npm 3.10.8, updating to that version straight from 1.4.9 works just fine.
b) You don’t need any other guide or prepackaged thing.

The only thing I’d change about this guide is using something like the following command for updating npm instead:

Because IMO, using the global flag is against the whole point of creating a portable node/npm «bundle».
(as for «npm@latest» — simply because it seems to be the officially recommended way of doing things)

Also note that setting the PATH is important for using this portable bundle, even if you create/copy it straight to the root of your project. I thought to myself «I can call everything straight from there — what could possibly happen?». But then one of the tools I used tried to launch a sub process in one of the sub directories. And of course, there, all the tools couldn’t be found.

Читайте также:  Драйвер для sharp ar 5320 для windows 10

NodeJS Portable

Application: NodeJS
Category: Development
Description: Node.js® is a JavaScript runtime built on Chrome’s V8 JavaScript engine. Node.js uses an event-driven, non-blocking I/O model that makes it lightweight and efficient. Node.js’ package ecosystem, npm, is the largest ecosystem of open source libraries in the world.

Platform Runtime Binary:
Download NodeJS Portable [5.5MB download / 21MB installed]
(MD5: b3fda3cc0740ff381a02d8bf6631342a)

Release Notes:
v4.2.1 (2015-10-15): Latest release

nodejs by itself doesn’t give anything.
just like having java for example.
its a runtime for other apps, so why do I need it as a portable app, if running it doesn’t do anything?
if it is to run nodejs apps, node.exe by itself is already portable so. why?

You are correct that NodeJS itself is somewhat portable.
However, this release replicates a full NodeJS installation and bundles NPM (Node Package Manager), which isn’t portable (especially when using global packages).

npm is portable unless you are talking about the ability to run npm install and other npm commands anywhere in your pc.
but that would require adding npm to the pc PATH, which would is not portable and i doubt you are doing.
so if you aren’t doing that. npm by itself is already portable as it is just few bat/shell + js files (I have 3 versions in my pc, none are installed, just unzipped from github).

For developers, i think this won’t be enough. for users, it is not needed unless paf will enable it to be a common runtime and use it to run js based apps. but most of these apps today come with node built in like atom/brackets/.

Hi
I just relases a package for Node.js 12.18.3 on my GitHub

This package is completely written from scratch

Installing Node.js via package manager

Note: The packages on this page are maintained and supported by their respective packagers, not the Node.js core team. Please report any issues you encounter to the package maintainer. If it turns out your issue is a bug in Node.js itself, the maintainer will report the issue upstream.

Android

Android support is still experimental in Node.js, so precompiled binaries are not yet provided by Node.js developers.

However, there are some third-party solutions. For example, Termux community provides terminal emulator and Linux environment for Android, as well as own package manager and extensive collection of many precompiled applications. This command in Termux app will install the last available Node.js version:

Currently, Termux Node.js binaries are linked against system-icu (depending on libicu package).

Arch Linux

Node.js and npm packages are available in the Community Repository.

CentOS, Fedora and Red Hat Enterprise Linux

Node.js is available as a module called nodejs in CentOS/RHEL 8 and Fedora.

where corresponds to the major version of Node.js. To see a list of available streams:

For example, to install Node.js 12:

For CentOS/RHEL 7 Node.js is available via Software Collections.

Alternatives

These resources provide packages compatible with CentOS, Fedora, and RHEL.

Debian and Ubuntu based Linux distributions

Alternatives

Packages compatible with Debian and Ubuntu based Linux distributions are available via Node.js snaps.

Fast and simple Node.js version manager built in Rust used to manage multiple released Node.js versions. It allows you to perform operations like install, uninstall, switch Node versions automatically based on the current directory, etc. To install fnm, use this install script.

fnm has cross-platform support (macOS, Windows, Linux) & all poplar shells (Bash, Zsh, Fish, PowerShell, Windows Command Line Prompt) it’s built with speed in mind and compatibility support for .node-version and .nvmrc files.

Читайте также:  Using lib in linux

FreeBSD

The most recent release of Node.js is available via the www/node port.

Install a binary package via pkg:

Or compile it on your own using ports:

Gentoo

Node.js is available in the portage tree.

IBM i

LTS versions of Node.js are available from IBM, and are available via the ‘yum’ package manager. The package name is nodejs followed by the major version number (for instance, nodejs12 , nodejs14 etc)

To install Node.js 14.x from the command line, run the following as a user with *ALLOBJ special authority:

Node.js can also be installed with the IBM i Access Client Solutions product. See this support document for more details

macOS

Download the macOS Installer directly from the nodejs.org web site.

If you want to download the package with bash:

Alternatives

Using Homebrew:

Using MacPorts:

Using pkgsrc:

Install the binary package:

Or build manually from pkgsrc:

n is a simple to use Node.js version manager for Mac and Linux. Specify the target version to install using a rich syntax, or select from a menu of previously downloaded versions. The versions are installed system-wide or user-wide, and for more targeted use you can run a version directly from the cached downloads.

See the homepage for install methods (boostrap, npm, Homebrew, third-party), and all the usage details.

If you already have npm then installing n and then the newest LTS node version is as simple as:

NetBSD

Node.js is available in the pkgsrc tree:

Or install a binary package (if available for your platform) using pkgin:

Nodenv

nodenv is a lightweight node version manager, similar to nvm . It’s simple and predictable. A rich plugin ecosystem lets you tailor it to suit your needs. Use nodenv to pick a Node version for your application and guarantee that your development environment matches production.

Nodenv installation instructions are maintained on its Github page. Please visit that page to ensure you’re following the latest version of the installation steps.

Node Version Manager is a bash script used to manage multiple released Node.js versions. It allows you to perform operations like install, uninstall, switch version, etc. To install nvm, use this install script.

On Unix / OS X systems Node.js built from source can be installed using nvm by installing into the location that nvm expects:

After this you can use nvm to switch between released versions and versions built from source. For example, if the version of Node.js is v8.0.0-pre:

Once the official release is out you will want to uninstall the version built from source:

OpenBSD

Node.js is available through the ports system.

Using pkg_add on OpenBSD:

openSUSE and SLE

Node.js is available in the main repositories under the following packages:

  • openSUSE Leap 42.2: nodejs4
  • openSUSE Leap 42.3: nodejs4 , nodejs6
  • openSUSE Tumbleweed: nodejs4 , nodejs6 , nodejs8
  • SUSE Linux Enterprise Server (SLES) 12: nodejs4 , nodejs6 (The «Web and Scripting Module» must be added before installing.)

For example, to install Node.js 4.x on openSUSE Leap 42.2, run the following as root:

SmartOS and illumos

SmartOS images come with pkgsrc pre-installed. On other illumos distributions, first install pkgsrc, then you may install the binary package as normal:

Or build manually from pkgsrc:

Node.js snaps are available as node on the Snap store.

Solus

Solus provides Node.js in its main repository.

Void Linux

Void Linux ships Node.js stable in the main repository.

Windows

Download the Windows Installer directly from the nodejs.org web site.

Alternatives

Using Chocolatey:

Using Scoop:

IBM® SDK for Node.js — z/OS® is available in two installation formats, SMP/E and PAX. Select the installation format that applies to you:

В© OpenJS Foundation. All Rights Reserved. Portions of this site originally В© Joyent.

Оцените статью