• Guides

How To Install Gulp On Windows 11

How To Install Gulp On Windows 11

Installing Gulp for the first time can be tricky. This tutorial will guide you through every step of the installation. The steps below are for installing Gulp on a Windows 11 PC. If you run into any issues, feel free to describe the problem in the comments section at the bottom of the page.


Install NPM (Node.js)

  1. Download the 64-bit version of Node.js (which includes NPM).
  2. Install it anywhere you like. By default, it installs to: C:\Program Files\nodejs
  3. On your computer, go to: Control Panel → System → Advanced system settings → Environment Variables
  4. Select the PATH variable and choose to edit it.
  5. If the PATH variable is empty, set it to (replace {YOUR USERNAME HERE} with your Windows username):
    C:\Users\{YOUR USERNAME HERE}\AppData\Roaming\npm;C:\Program Files\nodejs
    If C:\Users\{YOUR USERNAME HERE}\AppData\Roaming\npm is already present, just append:
    ;C:\Program Files\nodejs
  6. Open File Explorer and navigate to: C:\Users\{YOUR USERNAME HERE}\AppData\Roaming If the npm folder doesn’t exist, create it manually by right-clicking and selecting New Folder, then name it npm.
  7. Restart your command line, or open one by searching for cmd. To check if NPM is installed, run:
    npm -v
    You should see a version number if everything is working correctly.

Create yourgulpfile.js

A JavaScript file is required to run Gulp tasks. Create a file named gulpfile.js in the folder where you want to use Gulp and add the following:

// Require Gulp into the file and define the variable
var gulp = require('gulp');

// Run the example task. If installed correctly and "gulp talktome" is run,
// "Hello From Zestcode" should be printed in the logs
gulp.task('talktome', function() {
  console.log('Hello From Zestcode');
});

Install Gulp

To install Gulp:

  1. Open the terminal in the directory where you created gulpfile.js.

  2. Run:

    npm i gulp --save-dev
  3. Once installed, run:

    gulp talktome

You should see:

Hello From Zestcode

If you do, congratulations — you’ve successfully installed NPM and Gulp.


Finding & Installing Custom Packages

Now that Gulp is running in your folder, you can begin installing custom packages for task automation. Popular tasks include:

  • Sass compilation
  • JS minification
  • FTP uploads
  • Image compression
  • Copying assets
  • Error checking

You can explore available NPM packages at npmjs.com.

Expand Your Services
and Boost Agency Revenue

Start within 5 days
Bespoke onboarding process
5 / 5
From 10+ Google Reviews