title: Gulp-Change giving TypeError | React Application
body: <p>I'm following a pretty basic tutorial for react to get acquainted with how it functions.  So forgive me if I've missed something obvious.  Part of the beginning of the tutorial was setting up gulp to handle sass files.  So I set up my gulp file, setup my dependencies and tried to save my scss file, unfortunately I got an <code>TypeError</code> error and spent about an hour or so trying to overcome it on my own, but couldn't find anything concrete.  </p>
  
  <p>I'm running into an issue with gulp-change.  I've gone line by line and ensure that was the line causing the <code>TypeError</code> issue. 
  <strong>gulpfile.js</strong></p>
  
  <pre><code>'use strict';
  
  var gulp = require('gulp');
  var sass = require('gulp-sass');
  var minifyCSS = require('gulp-clean-css');
  var uglify = require('gulp-uglify');
  var rename = require('gulp-rename');
  var changed = require('gulp-change');
  
  /////////////////
  // - SCSS / CSS
  /////////////////
  
  var SCSS_SRC = './src/Assets/scss/**/*.scss';
  var SCSS_DEST = './src/Assets/css';
  
  gulp.task('compile_scss', function(){
      gulp.src(SCSS_SRC)
      .pipe(sass().on('error', sass.logError))
      .pipe(minifyCSS())
      .pipe(rename({ suffix: '.min' }))
  
      ////////////line creating the error//////////////
      .pipe(changed(SCSS_DEST))        
      .pipe(gulp.dest(SCSS_DEST));
  });
  
  //detect changes in SCSS
  gulp.task('watch_scss', function(){
      gulp.watch(SCSS_SRC, ['compile_scss']);
  });
  
  //run tasks
  gulp.task('default', ['watch_scss']);
  </code></pre>
  
  <p><strong>Error Given</strong></p>
  
  <pre><code>internal/streams/legacy.js:59
        throw er; // Unhandled stream error in pipe.
  
  TypeError: run.call is not a function
      at R:\Documents\Projects\React Goal App\goal-app\node_modules\gulp-change\index.js:31:14
      at wrappedMapper (R:\Documents\Projects\React Goal App\goal-app\node_modules\map-stream\index.js:84:19)
      at Stream.stream.write (R:\Documents\Projects\React Goal App\goal-app\node_modules\map-stream\index.js:96:21)
      at Transform.ondata (_stream_readable.js:639:20)
      at emitOne (events.js:116:13)
      at Transform.emit (events.js:211:7)
      at addChunk (_stream_readable.js:263:12)
      at readableAddChunk (_stream_readable.js:250:11)
      at Transform.Readable.push (_stream_readable.js:208:10)
      at Transform.push (_stream_transform.js:147:32)
  </code></pre>
  
  <p><strong>gulp-change index.js</strong></p>
  
  <pre><code>var eventStream = require('event-stream');
  
  module.exports = gulpChange;
  
  function gulpChange(run) {
      return eventStream.map(function(file, done) {
          if (file.isNull()) {
              return done(null, file);
          }
          if (file.isStream()) {
              return done(new PluginError('gulp-change', 'Streaming not supported.'));
          }
          var content = file.contents.toString();
          var ctx = {
              file: file,
              fname: file.history[file.history.length - 1].substr(file.base.length),
              originalContent: content
          };
  
          function next(err, content) {
              if (err) {
                  return done(err);
              }
              if (content) {
                  file.contents = new Buffer(content);
              }
              done(null, file);
          }
  
          if (run.length &gt; 1) {
  ////////////////line 31 where run is indicated as not a function/////////////
              run.call(ctx, content, next);
          } else {
              next(null, run.call(ctx, content))
          }
      });
  }
  </code></pre>
  
  <p><strong>default.scss file I'm working with</strong></p>
  
  <pre><code>body{
      font-size: 10px;
  }
  </code></pre>
  
  <p><strong>Folder Structure for scss/css</strong></p>
  
  <ul>
  <li>goal-app (root)
  
  <ul>
  <li>src
  
  <ul>
  <li>Assets
  
  <ul>
  <li>css</li>
  <li>scss
  
  <ul>
  <li>default.scss</li>
  </ul></li>
  </ul></li>
  </ul></li>
  </ul></li>
  </ul>