Can't change node version - Windows - node.js

Working on windows x64
Tryied different thing to use node version 10.19.0 but nothing work.
What I dont understand is following behavior
I installed nvm
node -v return v12.16.1
nvm list return
10.19.0
5.4.0
should'nt nvm list return avaible version of nodejs?`
Edit:
I tryed nvm use 10.19.0 but doesnt seem to work
nvm use 12.16.1 return node v12.16.1 (64-bit) is not installed.

I had nodeJs installed in path
C:\Program Files\nodejs
Installing new version of node with nvm was installing in
C:\Users\{myname}\AppData\Roaming\nvm
I changed windows variable NVM_SYMLINK to path
C:\Users\{myname}\AppData\Roaming\nvm

Related

node version manager not changing the Node Version in Ubuntu. Stuck on system node version. How to change node version using nvm?

I am trying to do
npm install wrtc
with node version 16.14.0
but that's not getting done. It's giving
npm error code 1
So I was trying to change node version to previous lts which was 14.19.0 but it's not getting changed
I did...
node -v
nvm list
nvm use 14.19.0 => output - ***Now using node v14.19.0 (npm v8.5.3)***
node -v (version not changed... Still 16.14.0
nvm list - shows the arrow mark '->' still on system
Are you following these steps?
Please make sure that your npm version is correctly installed according to your node version.

Can't switch to another version of Node

I can't switch any more to another of Node versions I Installed via NVM.
So far I did it by using these commands:
nvm list //to check Node versions available on my machine
nvm use X.X.X //to pick a version
node -v //to check if I'm using the Node version I picked
Now If I run those commands I see that the current node version is always 14.17.0. This is what Visual Studio Code terminal shows me:
$ nvm list
14.0.0
12.11.0
12.2.0
12.0.0
11.11.0
10.24.1
8.16.2
$ nvm use 12.0.0
Now using node v12.0.0 (64-bit)
$ node -v
v14.17.0

Which version of node am I using?

I recently updated my version of node using homebrew to begin learning angular and ran into something curious. Upon using:
brew upgrade node
It responds:
node 13.7.0 already installed
But then when I check which version, this happens.
node -v
v10.15.3
So am I really using 13.7? Because according to https://angular.io/guide/setup-local I need version 10.9 or better. So 10.15 would certainly be a problem.
Try running this command which -a node in your command shell.
That will list all the node binaries in your PATH. More than likely your path is mucked up and the MacOS installed version of node is found in the path before the brew-installed version of `node.

How do I change my Node version after installing it using Homebrew?

After installing Node using Homebrew on OSX 10.11.6 I now have a copy of node installed at
/usr/local/Cellar/node/10.7.0.
However, the version of Node that appears when I run
$ node -v
in terminal is
v0.12.7
I would like OSX terminal to reference the v10.07 of Node I just installed via Homebrew when I type
$ node
How do I change which node version that OSX terminal recognizes?
You should try using NVM. It allows you to install multiple versions of Node on your machine and switch between them conveniently:
see NVM docs

How can I use nvm to manage multiple locally installed node.js?

I already have multiple node.js versions installed locally in my x-Linux box,
0.10.40, 0.12.7 and 4.0
My default profile is pointing to node.js 0.12.7
Currently, I set my PATH to point to different versions of node when I start a new terminal.
I would like to use node version manager to use and manage different version of node that is already installed in my environment .
How should I do it without reinstalling node again?
Answering Original Post
For the small amount of data that you'd save by doing the following, it's almost not worth it. That being said...
Find where current versions are stored in nvm:
> nvm which
# mac
/Users/[username]/.nvm/versions/node/[version]/bin/node
# linux
/home/[username]/.nvm/versions/node/[version]/bin/node
Find all your non-nvm installed versions of node:
> which -a node
(..pending how you are running each of your terminals for each version of node installed will tell how effective this command will be).
Then symbolic link each of them to a folder matching the version.
> ln -s /path/to/node/version ~/.nvm/versions/node/[version]
# `$HOME` or `~/` or `/Home/username/` ... you know which works.
Node and Version Swapping Made Simple
nvm-controlled versions of node installed
> nvm ls
v0.10.33
v0.10.36
v0.10.40
v4.0.0
v4.2.2
v5.0.0
-> v5.1.1
system
default -> v5.1.1
system -> v5.1.1
node -> stable (-> v5.1.1) (default)
stable -> 5.1 (-> v5.1.1) (default)
iojs -> N/A (default)
Install version x, x.y, or x.y.z: nvm install x.y.z.
ie:
> nvm install 4.2.2
# If you want all modules from another version too:
> nvm install 4.2.2 --reinstall-packages-from=0.10.40
Set the default version used:
> nvm use 5.1.1
# But if only a local node command required, use:
# nvm exec [version] [command]
> nvm exec 0.10.33 node server.js
.nvmrc file in project root to define which local version of node to use.
#.nvmrc file contents:
5.1.1
You can't using installed nodejs version with nvm,
Because nvm use own directory for managing versions
You just need reinstall node versions
nvm install 0.12.7
And then
nvm use 0.12.7

Resources