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
15
votes
1 answer

Why does node is not available to all users with NVM?

It's probably a newbie question but I'm wondering why when I install node with nvm, it is only available for this user (it's not "global"). Let's say I'm log into the server with a user "admin": curl…
Julien Le Coupanec
  • 7,742
  • 9
  • 53
  • 67
14
votes
4 answers

I keep getting 'You need to run "nvm install N/A" to install it before using it.' even tho I have already installed lts/*

nvm ls: -> system default -> system unstable -> system node -> stable (-> v12.16.3) (default) stable -> 12.16 (-> v12.16.3) (default) iojs -> N/A (default) lts/* -> lts/erbium (-> v12.16.3) lts/argon -> v4.9.1 (-> N/A) lts/boron -> v6.17.1…
Aero Wang
  • 8,382
  • 14
  • 63
  • 99
14
votes
6 answers

'node' is not recognized as an internal or external command after installing nvm, node and setting path

I installed NVM from the nvm-setup.zip Then, at the command prompt, I ran nvm install 8.11.2 Then I ran nvm use 8.11.2 which output now using node v8.11.2 (64-bit) Then I ran SET PATH=C:\Program Files\Nodejs;%PATH% However when I type node I…
Kirsten
  • 15,730
  • 41
  • 179
  • 318
14
votes
3 answers

Upgraded node and npm via nvm, but old node is still used for global packages

I've been using node 9.3.0 for a long time, but I recently migrated to 10.12.0. Everything went fine, when I do node -v and npm -v I get the correct versions: Paul-Bergs-Macbook:node paulrberg$ node -v v10.12.0 Paul-Bergs-Macbook:node paulrberg$…
Paul Razvan Berg
  • 16,949
  • 9
  • 76
  • 114
14
votes
5 answers

Alternatives to nvm?

I really just need something I can check into version control to declare a Node version, and swap out the Node version in someone's shell while they're in that directory. .nvmrc is supposed to do this but there's no official support for Fish and…
corysimmons
  • 7,296
  • 4
  • 57
  • 65
14
votes
4 answers

Installing Node.js - pros/cons of using Homebrew vs manually managing?

So I'm looking for some info on what the pros and cons are of managing a Node.js package that has been installed manually vs using Homebrew. Aside from the obvious advantages of having brew manage everything for you (as opposed to using nvm to keep…
pccjamie
  • 197
  • 1
  • 2
  • 10
13
votes
1 answer

How can I set the default Node.js version with nvm?

I'm using nvm to manage my Node.js versions. In my projects, I have .nvmrc files in the project root. When I run nvm use, I get the Node.js version needed for the project. This is all working great, but when I open up a new console window, at first…
Patrick Hund
  • 19,163
  • 11
  • 66
  • 95
13
votes
2 answers

NVM: npm install -g keeps using wrong version of node

I'm trying to install a package called expo-cli, but it is failing because npm keeps using the wrong version of node. I'm setting my node version to v12.4.0, which I confirm is set. But when I run npm install -g expo-cli, it keeps using v9.10.0 ➜ ~…
bigpotato
  • 26,262
  • 56
  • 178
  • 334
13
votes
3 answers

Permission Denied while installing Node on WSL using NVM

I tried to install Node LTS on WSL using NVM. While I successfully installed nvm, Node installation using nvm install --lts made some errors: mv: cannot move '/home/anesin1109/.nvm/.cache/bin/node-v10.15.3-linux-x64/files/bin' to…
anesin1109
  • 315
  • 3
  • 13
13
votes
4 answers

nvm with yarn Yarn requires Node.js 4.0 or higher to be installed

I have nvm: nvm ls v8.11.3 v8.11.4 -> v11.1.0 default -> 8.11.4 (-> v8.11.4) node -> stable (-> v11.1.0) (default) stable -> 11.1 (-> v11.1.0) (default) I installed yarn with: sudo apt-get install --no-install-recommends…
allay
  • 135
  • 1
  • 1
  • 9
13
votes
3 answers

Node version reset when computer reboots

I installed Node 9.11.1 using nvm install and my projects can use the updated features but whenever I reboot I get reset to v6.10.1. I've checked this answer nvm keeps "forgetting" node in new terminal session and upon typing nvm list I see that the…
Scott
  • 1,154
  • 1
  • 12
  • 25
13
votes
6 answers

Error: Cannot find module 'commander'

when I m running sails -v, sails lift or even installing npm I m getting this error Please help - Error: Cannot find module 'commander' at Function.Module._resolveFilename (module.js:536:15) at Function.Module._load (module.js:466:25) at…
Don
  • 503
  • 1
  • 4
  • 14
13
votes
2 answers

nvm proxy settings configuration file

Under Linux, I use $http_proxy and $https_proxy which works well for node and npm but nvm doesn't use them. In which configuration file should I write the proxy settings? uname -a: Linux Breizh-Atao 3.19.0-32-generic #37~14.04.1-Ubuntu SMP Thu Oct…
Aubin
  • 14,617
  • 9
  • 61
  • 84
13
votes
1 answer

Nvm node install checksums do not match because of a forward slash

I'm learning to use nvm to manage node versions, but all my installations fail with the error: checksums do not match. The only difference is the '\' in the found checksum: Computing checksum with shasum -a 256 Checksums do not match: …
Kirill Sajaev
  • 143
  • 1
  • 8
13
votes
1 answer

How to run NVM command from bash script

I want to run an NVM command from bash script i.e. nvm use 0.12.7. So, I have written in bash file: #!/bin/bash . ~/.nvm/nvm.sh nvm use 0.12.7 And then run the command in the terminal as sudo ./script.sh (script.sh is my bash file where above code…
StreetCoder
  • 9,871
  • 9
  • 44
  • 62