Node version is not persisting after update with NVM - node.js

I updated my node version from 8.x.x to 13.x.x using the cmds below:
nvm install stable
Running node -v immediately after this, shows the updated version. But re-opening the terminal the older version of node persists.
I had to do: nvm use 13 to enable node 13.x.x
What is the ideal way to keep using the latest node version with explicitly using nvm use every time?

nvm alias default 13
This solved the issue and set the node version permanent to 13.x.x

Related

How to change node version using nvm

I am developing two projects.
Each project requires different node version.(v12, v14)
When I try to use one node version, it occurs node-sass error.
Should I uninstall v12 and reinstall v14?
I heard it can be repaired using nvm.
Somebody tell me how to switch using nvm.
Thanks.
nvm list
nvm use 12.0.0
nvm use 14.0.0

You are running Node 12.13.0. Create React App requires Node 14 or higher. Please update your version of Node

Im creating a new react project using create-react-app but it gives an error that says "You are running Node 12.13.0.
Create React App requires Node 14 or higher.
Please update your version of Node."
i have tried many things which i found in online articles but did not work.
try using NVM (node version manager) is a portable solution for managing multiple versions of node.
nvm install node
nvm use node
nvm install --lts
nvm use --lts
install and use to install the latest version and use it.

I want to use Node 14 to run my project but it always runs on Node 12. How to fix this?

It shows node version 12 but with sudo it shows 14, I want to use version 14 in future, How can i configure it to version 14
Install NVM and desired versions of Node, after installing them you can choose any Node versions from the installed list and you can change the Node version in which your project wants to run.
In your case after installing nvm and Node 14.xx, try nvm use 14.xx or else your desired version. This will change to Node 14.xx version.
You can install NVM by going through this link https://github.com/nvm-sh/nvm
and after that you can install node versions through NVM itself.
I think this question will help you understand better.
How to change to an older version of Node.js
Just use your version instead of the older version.

NVM doesn't update Node to the newest version

I'm using NVM (Node version manager) version 1.1.7 on Windows 10 to update Node through the Powershell terminal on VSCode. Today it occured to me that even though after updating and using nvm use 14.15.4 and getting 2 elevation dialogs and NVM telling me that it's now using the newest version, when I do nvm list or node -v or get-command node they're all still telling me that it uses an older version of Node.
After looking around for a bit some solutions said to add "runtimeExecutable": "/Users/*user*/.nvm/versions/node/*version*/bin/node" to the launch.json of VSCode, but that specific path doesn't even exist on my computer.
Check if nvm alias default <version> solves the problem

How do I uninstall node using nvm or how uninstall one version of nodejs?

I have two versions of node.js installed (10.16.3 and 12.14.1) I use nvm to switch between both. Please how do I uninstall version 10 successfully without affecting version 12?
nvm uninstall 10.16.3 should do it. See https://github.com/nvm-sh/nvm#usage-1 for more information.

Resources