Wednesday, September 15, 2021

How to Install Node.js, VS Code Editor and Cypress in Windows?

Node.js Installation: 

I previous article I described how to install node.js, VS Code editor and Cypress in Linux platform. Here I will describe the same thing in Windows platform. The steps are as follows. 

1. Go to node.js site and download Node.js  msi/zip file for windows 32 or 64 bit.(I used msi file for Windows 64 bit)
2. Click on downloaded msi file and node.js setup wizard UI will appear as follows.
















3. Click on Next button and end user license agreement UI will display as follows.
















4. Do the checkbox on to accept terms for license agreement and click Next button, destination folder UI will show as follows.
















5. Choose the installation location path(I used default path) and click Next button, the custom setup UI will display as follows.
















6. Click on Next button and tools for native modules UI will display as follows.
















7. Click on Next button and ready to install node.js UI will show as follows.
















8. Click on Install button and installing node.js UI will show as follows.
















9. Once installation is done completed the node.js setup wizard UI will show as follows.
















10. Click on Finish button and go to Program Files directory of  C drive to check whether the nodejs folder is present.








11. Copy the location path C:\Program Files\nodejs and go to the advance system settings to setup environment variable . Variable name: NODE_HOME , Variable value: C:\Program Files\nodejs


















12. Add  %NODE_HOME% to the path and following UI will show.



















13. Open command prompt and check node version and node package manager version by typing    node -v and npm -v











VS Code Editor Installation:

Visual Studio Code(VS Code) is a popular and smart editor. In previous article I described how to install and download VS code for Linux platform. Now I will describe the same for Windows platform. 

1. Go to the VS Code website and download VS Code installer(.exe file) click here 

2. Double click on downloaded VS Code exe file and license agreement UI will show as follows.
 
















3. Click on "I accept the agreement" radio button and press to Next button, select destination location UI will appear as follows.

 













4. Choose installation location path(I used default path) and click on Next button, select start menu folder UI will display as follows.
















5. Just click Next button and select additional tasks UI will appear as follows.
















6. Check the "Create a desktop icon" box and click Next button, ready to install UI will show as follows.
















7. Click Install button and the following installing UI will display.
















8. Once installation is done, completing the visual studio code setup wizard will show as follows.

 














9. Check the "Launch Visual Studio Code" box and click Finish button, Visual Studio Welcome window will appear as follows.













10. To check Visual Studio Code version whether it is successfully installed, just open Command Prompt, type code --version, press ENTER key of keyboard. Installed VC code version will show as follows.











Cypress Installation:

In previous article I described cypress installation in Linux platform. Here I will describe how to install cypress in Windows platform step by step.
1. First create a folder/project(I named it CypressPractice) in your own local directory.














2. Open command prompt inside that folder and type npm init to generate package.json file.











3. In command prompt, type package name, version, description, entry point, test command, git repository, keywords, author, license and type yes, press ENTER from keyboard.











4. To install cypress type npm install cypress --save-dev in command prompt and press ENTER, cypress will install as follows.
 











5. Open the folder(CypressPractice) through VS Code editor, the folder will open as follows. Check node_modules, package-lock.json, package.json will be created inside that folder.














6. Open package.json file and check cypress version into that file to make sure cypress is successfully installed as follows.














7. To open cypress runner type npm run cypress:open and cypress runner will open as follows.













Here I have tried to explain node.js, vs code editor and cypress installation in easy way. I expect this article will assist cypress lovers who work Windows platform.