In the previous article, I have explained how to Install node.js and npm.
In this article, I am going to explain how to configure the environment variables for node.js and npm in your machine.
Let’s get started.
Appium – Configuring node.js and npm
node.js is a software required for executing the different node modules like Appium, WebDriverIO, AngularJS and many more.
Hence Appium is one of the node modules in the market which requires node.js software to be installed in our machine as a pre-requisite for using it.
On installing node.js in your machine, npm will come by default and is not required to be installed again.
npm is a command line installer and using which we can install different node modules like Appium, WebDriver, AngularJS in your machines. In the upcoming articles, I will explain – How to install Appium using npm command line tool.
As you have now understood the role of node.js and npm in Appium learning, let’s follow the below steps for configuring the environment variables for node.js and npm in your machine:
1) Go to your C: Drive where you can see your program files as shown below:
2) Going inside the ‘Program Files’ folder and click on ‘nodejs’ folder as shown below:
3) After going inside the nodejs folder, copy the Folder path as shown below:
4) Right click on the ‘This PC’ option and click on the ‘Properties’ option as shown below:
5) Click on the ‘Advanced System Settings’ > ‘Environment Variables’ button > System Variables ‘New’ button > Enter Variable Name as ‘NODE_HOME’ and Variable Value as the path copied in Step 3 and click on ‘OK’ buttons to close all the dialogs.
6) Now navigate to the Path mentioned in Step 3 and click on ‘node_modules’ folder as shown below:
7) After going inside the above node_modules folder, click on ‘npm’ folder to go inside it as shown below:
8) After going inside the npm folder, click on the ‘bin’ folder as shown below:
9) After going inside the bin folder, copy the npm bin folder path as shown below:
10) Right click on the ‘This PC’ option and click on the ‘Properties’ option as shown below:
11) Click on the ‘Advanced System Settings’ > ‘Environment Variables’ button > System Variables > Select Path Variable and then click on the ‘Edit’ button as shown below:
12) In the displayed ‘Edit Environment variable’, click on ‘New’ button and paste the path copied in the above step 9 and click on ‘OK’ buttons until all the dialogs get closed as shown below:
This concludes the configuration of environment variables for both node.js and npm in our machines.
- > To learn more about Appium, continue to the next post (Click on Next Post Link Below)
- > Check complete Appium Tutorial Contents here (Click here)
Please leave your questions/comments/feedback below.
Happy Learning 🙂
On a mission to contribute to the Software Testing Community in all possible ways.