Big News: Socket raises $60M Series C at a $1B valuation to secure software supply chains for AI-driven development.Announcement
Sign In

@jchip/nvm

Package Overview
Dependencies
Maintainers
1
Versions
32
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@jchip/nvm

Universal Node Version Manager (nvm) for Windows and Unix

Source
npmnpm
Version
1.2.0
Version published
Weekly downloads
61
-54.48%
Maintainers
1
Weekly downloads
 
Created
Source

nvm

This is a simple universal Node Version Manager for Windows and Unix.

Table Of Contents

  • Installation
  • Usage
  • License

Installation

Windows

You don't need admin rights to install or use, except the permission to execute PowerShell scripts.

Tested on Windows 10, 8.1, and 7. Windows 7 requires PowerShell updates, see update instructions.

Start a Windows PowerShell terminal and run the following: (copy and paste into shell and press enter)

From github.com:

cd $Env:USERPROFILE;
Invoke-WebRequest https://raw.githubusercontent.com/jchip/nvm/v1.2.0/install.ps1 -OutFile install.ps1;
.\install.ps1 -nvmhome $Env:USERPROFILE\nvm;
del install.ps1

or from unpkg.com:

cd $Env:USERPROFILE;
Invoke-WebRequest https://unpkg.com/@jchip/nvm@1.2.0/install.ps1 -OutFile install.ps1;
.\install.ps1 -nvmhome $Env:USERPROFILE\nvm;
del install.ps1
  • This will install nvm and current LTS Node.js (v10.16.0) to directory nvm under your home specified by $Env:USERPROFILE.

  • If you want to install this under another directory, then set it different for the param -nvmhome.

  • If you don't set it, then it will check $Env:NVM_HOME, and if non-existent, then a Directory Browser dialog will be opened for you to create and choose a directory.

Video Demo of upgrading Windows 7 to PowerShell 5.1 and then installing this

Troubleshooting

  • If you get the error:

install.ps1 cannot be loaded because running scripts is disabled on this system.

Then you need to run PowerShell as administrator and Set-ExecutionPolicy to RemoteSigned first, and then start a normal PowerShell to run the install script.

ie: Set-ExecutionPolicy -ExecutionPolicy RemoteSigned

See this StackOverflow question for details.

You need to keep this policy if you want to use nvm in PowerShell to switch node.js versions.

Windows 7 Updates

PowerShell version 4+ is required.

For Windows 7, you can update it to version 5.1 with the following instructions:

After it's completed and rebooted, launch PowerShell and type $PSVersionTable to check.

PSVersion should be something like 5.1.#####.####

Video Demo of upgrading Windows 7 to PowerShell 5.1 and then installing this

Unix

From github.com:

Using cURL and the install script:

NVM_HOME=~/nvm curl -o- https://raw.githubusercontent.com/jchip/nvm/v1.2.0/install.sh | bash

or wget:

NVM_HOME=~/nvm wget -qO- https://raw.githubusercontent.com/jchip/nvm/v1.2.0/install.sh | bash

or from unpkg.com:

Using cURL and the install script:

NVM_HOME=~/nvm curl -o- https://unpkg.com/@jchip/nvm@1.2.0/install.sh | bash

or wget:

NVM_HOME=~/nvm wget -qO- https://unpkg.com/@jchip/nvm@1.2.0/install.sh | bash

Usage

Usage: nvm <command> [options]

Commands:
  nvm install <version>    install the given version of Node
  nvm uninstall <version>  uninstall the given version of Node
  nvm use <version>        use the given version of Node in current shell
  nvm stop                 undo effects of nvm in current shell
  nvm link <version>       permanently link the version of Node as default
  nvm unlink               permanently unlink the default version
  nvm ls                   list the installed all Nodes
  nvm ls-remote            list remote versions available for install
  nvm cleanup              remove stale local caches

Options:
  --version, -V, -v  Show version number
  --help, -?, -h     Show help. Add a command to show its help          [string]


Examples:

    nvm install v10.16.0
    nvm uninstall v12.4.0
    nvm use v10.16.0

License

MIT

Keywords

Node

FAQs

Package last updated on 31 Jul 2019

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts