gulp command not found (Mac OS)

20,823

Check that you installed gulp globally:

npm install -g gulp

Another idea is to add scripts to your package.json file along the lines of:

{
  "name": "testing-app",
  "version": "0.9",
  "scripts": {
    "gulp": "gulp",
    "serve": "gulp serve"
  }
}

Then use npm run serve...

Share:
20,823

Related videos on Youtube

roxxypoxxy
Author by

roxxypoxxy

Ruby, Rails, Javascript, NodeJs

Updated on November 06, 2020

Comments

  • roxxypoxxy
    roxxypoxxy over 3 years

    I have been trying to setup an angular js project with yo, grunt and generator-gulp-angular. Although I install all packages, gulp comand is not found, however it works if I go inside node_modules.

    This code will explain my issue:

    $ npm -v
    # 2.5.1
    $ npm install -g yo
    $ npm install -g generator-gulp-angular
    $ mkdir client && cd $_
    $ yo gulp-angular ng_demo
    $ gulp serve
    # command not found
    $ node_modules/gulp/bin/gulp.js serve
    # works
    

    I am using zsh. What may be going wrong?

  • landed
    landed over 8 years
    Do we always need to use sudo to install gulp globally ? I get red errors if using user so had to use sudo - then when I exit to user and try to run gulp I get command not found. grrrr
  • Darryl Mendonez
    Darryl Mendonez almost 8 years
    This worked for me except I had to add 'sudo' in front of it and then type in my password.