Questions tagged [nvm]

Node Version Manager - Simple bash script to manage multiple active node.js versions

nvm is a version manager for Node.js. It is designed to be installed per-user and invoked per-shell. nvm works on any POSIX-compliant shell (sh, dash, ksh, zsh, bash). It works on Unix-like operating systems, including Linux, macOS, and Windows WSL.

References

1092 questions
1448
votes
27 answers

How can the default node version be set using NVM?

I have installed nvm (ubuntu with zsh shell) with two node version: v6.11.5 and v9.0.0 and the default version in nvm is the v9.0.0 Every time I need to change the node version $ nvm list v6.11.5 -> v9.0.0 system default ->…
Pablo Ezequiel Inchausti
  • 16,623
  • 7
  • 28
  • 42
802
votes
29 answers

nvm keeps "forgetting" node in new terminal session

Upon using a new terminal session in OS X, nvm forgets the node version and defaults to nothing: $ nvm ls: .nvm v0.11.12 v0.11.13 I have to keep hitting nvm use v.0.11.13 in every session: .nvm v0.11.12 -> …
frhd
  • 9,396
  • 5
  • 24
  • 41
692
votes
36 answers

Node Version Manager install - nvm command not found

I am trying to install NVM as per these instructions I typed in this command in terminal: $ curl https://raw.github.com/creationix/nvm/master/install.sh | sh After running the install, I restart the terminal and attempt to install Node.js with this…
jordan
  • 9,570
  • 9
  • 43
  • 78
433
votes
11 answers

How to properly upgrade node using nvm

Is it possible to upgrade node right in place, instead of manually installing the latest stable version? I have installed node.js version 5.0 with nvm, but now I want to update it to 5.4. I'm trying to avoid having to manually reinstall all of my…
Boris Burkov
  • 13,420
  • 17
  • 74
  • 109
299
votes
23 answers

nvm is not compatible with the npm config "prefix" option:

I am trying to run another NodeJS version with nvm but getting this error: $ nvm use v4.2.4 nvm is not compatible with the npm config "prefix" option: currently set to "/Users/z/.npm-global" Run `npm config delete prefix` or `nvm use…
Dmitri Zaitsev
  • 13,548
  • 11
  • 76
  • 110
226
votes
10 answers

What is the recommended way to install Node.js, nvm and npm on MacOS X?

I am trying to use Homebrew as much as possible. What's the recommended way to install Node.js, nvm and npm on MacOS X?
ohho
  • 50,879
  • 75
  • 256
  • 383
225
votes
5 answers

How to change Node.js version with nvm

I'm using Yeoman to create a project. When I try to use Gulp.js I run the command gulp serve. An error tells me that I need an older version of Node.js (8.9.4), knowing that I've installed the latest version (10.14.1). So I installed nvm to change…
Bilal Dekar
  • 3,200
  • 4
  • 28
  • 53
206
votes
6 answers

How to write a .nvmrc file which automatically change node version

Hi I have two projects one in angularjs 4.4.7 and another in angular 6 version. I need to switch between node version for this. I tried using NVM which is working manually. How to handle the version change inside the angularjs program to change the…
Janani Hariharan
  • 2,179
  • 2
  • 7
  • 9
199
votes
19 answers

run `nvm use` automatically every time there's a .nvmrc file on the directory

How to configure my shell so that nvm use run automatically every time there's a .nvmrc file on the directory and use the latest version or a global config when there's no .nvmrc file?
Gabo Esquivel
  • 3,494
  • 2
  • 23
  • 18
192
votes
34 answers

Visual Studio Code to use node version specified by NVM

Is it possible for VS Code to use node version specified by NVM? I have 6.9.2 installed locally. Even after switching to another version, from the OS X terminal (not the VS Code terminal), restarting VS Code, VS Code still shows using 6.9.2. OS X…
A G
  • 21,087
  • 11
  • 87
  • 112
175
votes
25 answers

How to install nvm in docker?

I am in the process of building a new Docker image and I'm looking to get NVM installed so I can manage nodejs. Reading the docs on how to install NVM they mention that you need to source your .bashrc file in order to start using NVM. I've tried to…
David Ficociello
  • 2,489
  • 5
  • 15
  • 21
167
votes
14 answers

Can't use NVM from root (or sudo)

I've noticed that my application uses different version of NodeJS when running from sudo. $ node -v v0.10.23 $ sudo node -v v0.11.8-pre This v0.11.8-pre caused me some problems, so I definitely don't want to use it, but I can't change it for…
Vitalii Korsakov
  • 45,737
  • 20
  • 72
  • 90
165
votes
10 answers

Homebrew installs nvm but nvm can't be found afterwards?

I'm using homebrew and oh-my-zsh on a fresh OSX 10.10.1 install. I got nvm via homebrew and then attempted to run it but says - zsh: command not found: nvm Any idea what the problem is? I was able to install and use git just fine... UPDATED…
Dayan
  • 7,634
  • 11
  • 49
  • 76
139
votes
3 answers

Difference between NPM and NVM

I know npm is the package manager and nvm is the node version manager. I am currently trying to auto-install my development and production environment using Bash and forgot how I started out and in what order. After installing npm, I found our nvm…
JohnTheBeloved
  • 2,323
  • 3
  • 19
  • 24
130
votes
6 answers

nvm: N/A: version "N/A -> N/A" is not yet installed

I have nvm setup to use the latest long term support version in ~/.nvm/alias/default, by setting it to lts/*. When I try and have my shell initialize my nvm version (zsh), I get the following error: N/A: version "N/A -> N/A" is not yet…
Brad Parks
  • 66,836
  • 64
  • 257
  • 336
1
2 3
72 73