roxxypoxxy
roxxypoxxy

Reputation: 3121

gulp command not found (Mac OS)

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?

Upvotes: 4

Views: 21353

Answers (1)

apotry
apotry

Reputation: 1866

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...

Upvotes: 21

Related Questions