Questions tagged [nvm]
Node Version Manager - Simple bash script to manage multiple active node.js versions
1,155
questions
1726
votes
24
answers
1.5m
views
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....
852
votes
34
answers
297k
views
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 ...
756
votes
37
answers
1.4m
views
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 ...
472
votes
13
answers
464k
views
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 ...
308
votes
23
answers
206k
views
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 ...
273
votes
6
answers
582k
views
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 ...
259
votes
8
answers
342k
views
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 ...
237
votes
10
answers
155k
views
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?
227
votes
21
answers
171k
views
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?
226
votes
34
answers
268k
views
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), ...
191
votes
27
answers
157k
views
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 ....
182
votes
14
answers
154k
views
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 ...
182
votes
11
answers
152k
views
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 ...
143
votes
9
answers
222k
views
GLIBC_2.27 not found while installing Node on Amazon EC2 instance
I'm trying to install Nodejs on Amazon linux machine, I'm following this documentation to install node https://docs.aws.amazon.com/sdk-for-javascript/v2/developer-guide/setting-up-node-on-ec2-instance....
143
votes
4
answers
138k
views
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 ...
138
votes
7
answers
58k
views
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:
...
129
votes
4
answers
262k
views
How to brew install specific version of Node?
For example I want to install either 7.9 or 7.10 but want to avoid Node 8 due to the webpack node-sass breaking bug.
When I run brew search node this is what I see:
❯ brew search node
leafnode ...
121
votes
9
answers
159k
views
How to run "nvm" in "oh my zsh"?
In the system there is a nodejs, installed through nvm. The command is not running npm.
Console is Oh my zsh
118
votes
26
answers
188k
views
nvm use does not switch node versions
on a Windows 10 machine and using nvm4w I tried:
from the above image:
node --version to check the current version
nvm list to list installed versions
nvm use 8.8.1 so we switch from 6 to 8
nvm on ...
111
votes
6
answers
148k
views
Yarn not installing in nvm version node version
I'm running into an issue with yarn when I change my nvm version of node.
I noticed when I check my ~/.nvm folder I see two node versions.
v8.11.0
v8.11.3.
I installed yarn globally. using npm ...
108
votes
9
answers
248k
views
nvm uninstall doesn't actually uninstall the node version
So I'm trying to clear out older versions of node.js.
I start with:
$ nvm ls
v0.10.30
v4.2.3
-> v6.6.0
system
I don't want the older versions, so I then do:
$ nvm uninstall ...
105
votes
13
answers
430k
views
Why isn't Node Version Manager (NVM) recognized on Windows?
I am trying to downgrade my version of node
I ran:
npm install nvm
and I exported the bin folder to my Windows path variable,
C:\Program Files (x86)\nodejs\node_modules\npm\bin
but I still get:
'...
104
votes
9
answers
143k
views
Brew install nvm. nvm: command not found
After installing nvm with brew, and running nvm, it says nvm: command not found
How can I get the command to execute?
100
votes
23
answers
130k
views
nvm ls-remote command results in "N/A"
I'm trying to install Node with nvm, but when I type any version it's not available. When I type nvm ls-remote I just just get "N/A".
I'm able to access the Internet, so I can't figure what could be ...
92
votes
7
answers
49k
views
What uses / respects the .node-version file?
I've searched Stack Overflow and GitHub (for both node and nvm) for an answer, but to no avail.
In some repos (like GitHub's Atom text editor, for instance), I've come across a .node-version file. It ...
85
votes
7
answers
96k
views
NVM & Node.js - Recommended install for all users
is there a recommended install for nvm so all users can use it? i cannot find anything on the web regarding this.
this is what i did
installed nvm in a common directory
put the nvm.sh script ...
79
votes
33
answers
245k
views
NVM for Windows not working?
I just installed NVM for Windows, but it doesn't seem to be working:
Any ideas?
76
votes
7
answers
54k
views
wasm code commit Allocation failed - process out of memory
I have a nodejs script which was working fine on nodejs 12. I got a new macbook air on which I installed nodejs LTS 14. The scripts was not working as intended so I have downgraded it to nodejs 12 LTS....
72
votes
10
answers
43k
views
Updating npm when using nvm-windows
I'm using nvm-windows version 1.1.7.
I just installed node 11.9.0.
nvm installs npm version 6.5.0 together with this node version.
However, there's npm version 6.7.0 available already.
When I now ...
69
votes
11
answers
62k
views
NVM: Getting Permission denied with nvm install command
I recently fresh-installed Ubuntu 21.04 and wanted to install nvm:
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.38.0/install.sh | bash
Then closed and re-opened the terminal. When ...
63
votes
19
answers
92k
views
NPM not found when using NVM
I have installed node/npm using the nvm documentation.
curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.29.0/install.sh | bash
Then:
nvm install node
At this point node is working but ...
61
votes
5
answers
88k
views
Node.js - Configuring $NODE_PATH with NVM
On my way setting up Node.js with NVM, I stumbled upon an error when using Yeoman. I got
the error
Cannot find module 'yeoman-generator'
After some research I found this post on StackOverflow, ...
61
votes
8
answers
34k
views
Can't uninstall global npm packages after installing nvm
I've found several threads related to this issue but none seem to deal with my case specifically and I've been unable to solve using the suggestions I've found.
When I run npm uninstall -g "some ...
59
votes
3
answers
21k
views
Cannot find module 'agentkeepalive' when updating NPM to 7.20.3
When I'm trying to update npm to 7.20.3 (npm install -g [email protected]), npm throws :
npm ERR! code MODULE_NOT_FOUND
npm ERR! Cannot find module 'agentkeepalive'
npm ERR! Require stack:
npm ERR! - /Users/...
58
votes
18
answers
252k
views
'nvm' is not recognized as an internal or external command Windows
Installed NVM (Node version manager ) for windows from here. Actually NVM was getting installed in Administrator account. Thought to install it in C:\Node\ directory so it would be found in CMDfor ...
57
votes
2
answers
66k
views
zsh: bad CPU type in executable: node
I have installed nvm using brew. After that, I installed node version of 16 through nvm and check the current version using node -v to see whether the node is working properly. However, when I install ...
57
votes
5
answers
143k
views
Uninstalling the currently active version of node.js with nvm
On Ubuntu 16.04, I mistakenly used root to install nvm, and then to install node.js 8.8.1 via nvm. I also used nvm alias default 8.8.1, thinking it would correct my error.
Now I would like to:
...
56
votes
5
answers
52k
views
installing node lts with nvm on windows
I've installed nvm on windows (from here), but running nvm install lts prints:
lts.0.0
Node.js vlts.0.0 is only available in 32-bit.
How do I install node lts on windows?
54
votes
7
answers
92k
views
nvm install node fails to install on macOS Big Sur M1 Chip
I'm trying to install the latest version of node using nvm. I've just got the newly released SIlicon Macbook Pro with the M1 chip (not sure if that is related). I've installed xcode on the app store ...
49
votes
7
answers
36k
views
Can't use nvm from bash script
I am trying to write a shell script to automate my dev environment set-up (install python, nvm, node, mongo etc...). I am using nvm to install Node. It tells you to close and reopen your terminal to ...
49
votes
10
answers
42k
views
Automatically switch to correct version of Node based on project
Let's say I have 2 projects:
example1: requires node version 0.12.1
example2: requires node version 0.10
Currently, when I cd into each project, I use nvm use <version> before running the ...
49
votes
5
answers
49k
views
Set node version differently for specific project(folder) via NVM
I know I can change the node version by nvm use CLI command. However, I want to set specific node version differently for a certain project(folder). It's changed via nvm use command but it's reverted ...
49
votes
2
answers
58k
views
NVM global module folder
I am using NVM and I am trying to install global NPM modules. That action requires permissions to a folder that I don't have permissions to. With regular node.js/npm that was easy to solve with prefix ...
43
votes
8
answers
63k
views
Getting the error message "This is not the package you are looking for" when trying to run nvm, why?
Went to use NVM today, and I got this error.
This is not the package you are looking for: please go to
http://nvm.sh
So I went there, and installed the new version. Installation went through, but I ...
42
votes
8
answers
146k
views
How to find what node version a project supports
Is there a way besides trial and error to detect what node version I should use on a repository ?
With the fast rise of web frameworks it's becoming a common need to go back to projects from 6, 12 or ...
40
votes
4
answers
29k
views
Install multiple version of node.js using NVM (Ubuntu)
How to install multiple version of node.js in Ubuntu using NVM?
38
votes
5
answers
54k
views
Where is node while using nvm?
I am on a MacOS, and I switched from Homebrew Node to NVM, and removed Node from Homebrew but then a lot of my previous packages cannot find Node anymore (Sublime, Heroku etc)...so I have to manually ...
37
votes
17
answers
39k
views
npm is installed using nvm but IntelliJ does not know about it
I installed NPM using NVM.
When I use npm in Intellij terminal, it says I don't have NPM installed. But if I use Ubuntu terminal, it is working.
Here are what I tried:
I have already tried to set ...
36
votes
8
answers
35k
views
Node version not updating after "nvm use" on mac
I am trying to update my local node version from 8.9.0 to 8.10.0 using nvm. But it's not getting reflected. Here's what I tried:
node -v
-> v8.9.0
nvm use 8.10.0
-> Now using node v8.10.0 (...
35
votes
7
answers
61k
views
"nvm use 16.13.0" will return this error "exit status 145: The directory is not empty."
I have 2 versions of node.js , as follow:-
Your environment has been set up for using Node.js 17.1.0 (x64) and npm.
C:\Windows\System32>nvm list
16.13.0
8.16.2
but when i try to use the ...