Skip to content

add info about using nvm to package-manaager.md #1129

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Feb 13, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 27 additions & 0 deletions locale/en/download/package-manager.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ title: Installing Node.js via package manager
* [FreeBSD and OpenBSD](#freebsd-and-openbsd)
* [Gentoo](#gentoo)
* [NetBSD](#netbsd)
* [nvm](#nvm)
* [openSUSE and SLE](#opensuse-and-sle)
* [OSX](#osx)
* [SmartOS and illumos](#smartos-and-illumos)
Expand Down Expand Up @@ -289,6 +290,32 @@ Or install a binary package (if available for your platform) using pkgin:
pkgin -y install nodejs
```

## nvm
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](https://github.com/creationix/nvm#install-script).

On Unix / OS X systems Node.js built from source can be installed using
[nvm](https://github.com/creationix/nvm) by installing into the location that nvm expects:

```bash
$ env VERSION=`python tools/getnodeversion.py` make install DESTDIR=`nvm_version_path v$VERSION` PREFIX=""
```

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:

```bash
$ nvm use 8
```

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

```bash
$ nvm uninstall 8
```

## openSUSE and SLE

Expand Down