How to Install NVM on Windows and iOS: A Step-by-Step Guide

How to Install NVM on Windows and iOS: A Step-by-Step Guide

Introduction

Are you in the middle of building various applications, trying to untangle the multiple wires that have got you stuck with finishing your projects? Professional work requires seamless transitions between the variety of node.js versions that exist on your device. For this, you will need to install NVM on Windows and iOS that will help you install, update, switch and work around several node.js projects simultaneously. 

This guide is the perfect place for understanding the methods for getting NVM on your preferred platforms in simple steps. Go through this detailed tutorial and set up your Node Version Manager on your device to boost up your productivity.

How To Install NVM In Your PC In Windows And IOS

NVM, short for Node Version Manager, is a tool that allows you to install and switch between different versions of Node.js and NPM on your device. This is useful for working on different projects that require specific versions of Node.js and NPM, or for testing your own packages with different Node.js environments.

However, NVM is only supported on Linux and Mac operating systems. If you want to use NVM on Windows or IOS, you need to use alternative tools that provide similar functionality. In this article, we will show you how to install and use these tools on your PC in Windows and iOS.

How To Install NVM on Windows

To install NVM on Windows, you need to use a tool called nvm-windows, which is created by coreybutler. nvm-windows is a management utility for installing and switching between Node.js versions on Windows. Here are the steps to install nvm-windows on your Windows PC:

1. Go to the github repo on GitHub and click on "Download Now!".

2. You will be taken to a page containing different versions of nvm-windows. Choose the latest version and download the nvm-setup.exe file under Assets.

3. Run the nvm-setup.exe file and follow the installation wizard. You can accept the default settings or change them according to your preference.

4. After the installation is complete, open a command prompt or PowerShell window and run nvm -v to check the version of nvm-windows installed. You should see something like this:

C:\>nvm -v

1.1.9

 

HOW TO INSTALL NVM ON IOS

To install NVM on iOS, you need to use a tool called n, which is created by tj. n is a Node.js version management utility for macOS and Linux, but it can also work on iOS devices with some additional steps. Here are the steps to install n on your iOS device:

1. You need to have a terminal app on your iOS device, such as [iSH] or [Blink Shell]. You also need to have a package manager, such as [apk] or [apt], to install some dependencies. For this example, we will use iSH and apk, but you can use other alternatives if you prefer.

2. Open iSH on your iOS device and run apk update to update the package list. Then run apk add curl make gcc g++ python3 linux-headers to install the required dependencies for n.

3. Run curl -L  10 | bash to install n on your iOS device. You will be asked to confirm the installation and enter your password. After the installation is complete, you will see a message like this:

  Installed:  node v16.13.0

  Active:     none

  Run `. /Users/username/.bashrc` to update your current shell.

  Use `n -h` for help.

4. Run . /Users/username/.bashrc to update your current shell. Then run n -V to check the version of n installed. You should see something like this:

$ n -V

7.4.1

 

 HOW TO USE NVM ON WINDOWS AND IOS

Now that you have installed nvm-windows on Windows and n on iOS, you can use them to install and switch between different versions of Node.js and NPM on your PC. Here are some common commands you can use with both tools:

  • nvm install node-version or n node-version: Install a specific version of Node.js and NPM. For example, nvm install 14.18.1 or n 14.18.1 will install Node.js v14.18.1 and NPM v6.14.15 on your device.
  • nvm use node-version or n node-version: Switch to a specific version of Node.js and NPM. For example, nvm use 14.18.1 or n 14.18.1 will activate Node.js v14.18.1 and NPM v6.14.15 on your device.
  • nvm list or n: List the versions of Node.js and NPM installed on your device. For example, nvm list or n will show something like this:

          12.22.7

          14.18.1

        * 16.13.0 (Currently using 64-bit executable)

  • nvm uninstall node-version or n rm node-version: Uninstall a specific version of Node.js and NPM from your device. For example, nvm uninstall 12.22.7 or n rm 12.22.7 will remove Node.js v12.22.7 and NPM v6.14.15 from your device.

Conclusion

Hope this thorough informative guide has gave you insightful tips on how to install and start using NVM on Windows and iOS easily. Now, you don’t need to juggle between several node.js and handle them effortlessly without worrying about errors.

Leave a comment