title: Gulp Package JSON
body: <p>I have created a demo using GULP, but facing issues to run the gulp js file.</p>
  
  <p>Process of installing:</p>
  
  <pre><code>sudo npm init 
  sudo npm install gulp-jshint gulp-sass gulp-concat gulp-uglify gulp-rename --save-dev
  sudo npm install --save-dev gulp
  </code></pre>
  
  <p>Console Warn:</p>
  
  <pre><code>mnbcvd3456:glp user$ sudo npm install gulp
  npm WARN package.json gulp@3.8.6 No repository field.
  npm WARN install Refusing to install gulp as a dependency of itself
  </code></pre>
  
  <p>package.JSON:</p>
  
  <pre><code>{
    "name": "gulp",
    "version": "3.8.6",
    "description": "Gulp Demo",
    "main": "index.js",
    "directories": {
      "doc": "doc"
    },
    "scripts": {
      "test": "echo \"Error: no test specified\" &amp;&amp; exit 1"
    },
    "author": "User",
    "license": "ISC",
    "devDependencies": {
      "gulp-concat": "^2.3.3",
      "gulp-jshint": "^1.7.1",
      "gulp-rename": "^1.2.0",
      "gulp-sass": "^0.7.2",
      "gulp-uglify": "^0.3.1"
    }
  }
  </code></pre>
  
  <p>Gulp.js file.</p>
  
  <pre><code>// Include gulp
  var gulp = require('gulp');
  
  // Include Our Plugins
  var jshint = require('gulp-jshint');
  var concat = require('gulp-concat');
  var uglify = require('gulp-uglify');
  var rename = require('gulp-rename');
  
  // Lint Task
  gulp.task('lint', function() {
      return gulp.src('js/*.js')
          .pipe(jshint())
          .pipe(jshint.reporter('default'));
  });
  
  // Concatenate &amp; Minify JS
  gulp.task('scripts', function() {
      return gulp.src('js/*.js')
          .pipe(concat('all.js'))
          .pipe(gulp.dest('dist'))
          .pipe(rename('all.min.js'))
          .pipe(uglify())
          .pipe(gulp.dest('dist'));
  });
  
  // Watch Files For Changes
  gulp.task('watch', function() {
      gulp.watch('js/*.js', ['lint', 'scripts']);
  });
  
  // Default Task
  gulp.task('default', ['lint', 'scripts', 'watch']);
  </code></pre>
  
  <p>Now If am trying to run my gulp js file, using the command "gulp". then its thowing an error as:</p>
  
  <pre><code>mnbcvd3456:glp user$ gulp
  
      module.js:340
          throw err;
                ^
      Error: Cannot find module 'gulp'
          at Function.Module._resolveFilename (module.js:338:15)
          at Function.Module._load (module.js:280:25)
          at Module.require (module.js:364:17)
          at require (module.js:380:17)
          at Object.&lt;anonymous&gt; (/Users/glp/gulpfile.js:5:12)
          at Module._compile (module.js:456:26)
          at Object.Module._extensions..js (module.js:474:10)
          at Module.load (module.js:356:32)
          at Function.Module._load (module.js:312:12)
          at Module.require (module.js:364:17)
  </code></pre>