Node version manger is a tool allows you to download, install, manage, and upgrade Node. js versions
- copy this command and paste it in your terminal
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.3/install.sh | bash
depending on the shell you are using bash
or zsh
, open a new terminal and
using ls -la
to show the hidden files, you will have one of those
.bash_profile, .zshrc, .profile, or .bashrc
- open one of the files above using
nano
ex:nano .zshrc
and paste this at the end
export NVM_DIR="$([ -z "${XDG_CONFIG_HOME-}" ] && printf %s "${HOME}/.nvm" || printf %s "${XDG_CONFIG_HOME}/nvm")"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm
then Ctrl + o
and Enter to save the changes and then Ctrl + x
to exit.
Note : If you are using zsh open .zshrc
using nano .zshrc
and add nvm to
plugins plugins=(git nvm) only NO need to paste the above command
- after that if you type on terminal
nvm --version
you should have a version.
- CLICK HERE
- install nvm-setup.exe
- restart your laptop
- open git bash and type
nvm --version
You should have a version
Note: for windows 10
or 11
, if nvm
didn't change the node version or you
got an error go to C:\Program Files\
and delete nodejs
folder and try again.
- run the command
nvm install 15
- run the command to make node v15 your default version
nvm alias default 15
if you type node -v
the version should be 15
- let us install
study-lenses
package
npm install -g study-lenses
now if you type npm list -g --depth=0
you should see study-lenses