Gulp Installation and Environment Setup



In the previous article we have learnt about basics of Gulp Task runner. In this tutorial we will be learning basic installation steps for installing Gulp.

Basic installation steps :

Step 1 : Firstly we need to install Node.js to run Gulp tasks. To install node.js, download Node.js from https://nodejs.org/en/

Download the latest features version of the zip file.

Step 2 − After downloading the latest installer, Run the setup to install the NodeJs on your computer.

Step 3 − Once you are done with installation of node.js in your PC, Set environment variables with below steps -

Setting up Environment Variables

Right-click on My Computer.

Select Properties.

Select Advanced tab and click ‘Environment Variables’.

Under Environment Variables window, double-click on the Path as shown in the following screen.

Click on Edit button to edit the variable. Variable window as shown in the following screenshot.Add Node.js folder path in the Variable Value field as C:\Program Files\nodejs\node_modules\npm.

In Older Windows

If that path have already added variables then you need to put a semicolon (;) after that and add node.js path as shown -

In Window 10 -

Window 10 provided new front end for additing new value in system or environment variable. Click on new to create placeholder for new value.

Step 4 − Open the command prompt and enter the following command. It will display version of Node.js that we have just installed.

node -v

Step 5 − In order to install node packages, we need node package manager. To check the version of npm we need to run below command.

npm -v

Step 7 − To Install gulp task runner, hit below command. -g stands for global, i.e gulp will be installed globally and it will be available for all the projects.

npm install gulp -g

Step 6 − Open the command prompt and enter the following command. It will display version of Node.js that we have just installed.

gulp -v