gulpfile not finding required file

I have a gulp file I can run successfully from the terminal but when i try to run it from a webstorm configuration (version 11.0.1), it says it is missing a package , gulp-util. i have a screenshot attached showing th error as well as my gulp configuration. my gulp file is pretty simple and I copied it below. anyways, any suggestion is appreciated.

 
var gulp=require('gulp');
var gutil = require('gulp-util');
var source = require('vinyl-source-stream');
var browserify = require('browserify');
var watchify = require('watchify');
var reactify = require('reactify');
var uglify = require('gulp-uglify');
var streamify = require('gulp-streamify');

gulp.task("default", function () {
var bundler = watchify(browserify({
  entries : ['./assets/js/app.jsx'],
  transform: [reactify],
  extensions : ['.js', '.jsx'],
  debug:true,
  cache:{},
  packageCache:{},
  fullPaths:true
}))

function build(file) {
  if (file) gutil.log('recompiling '+file);
  return bundler
   
.bundle()
   .on('error', gutil.log.bind(gutil, 'error'))
   .pipe(source('./assets/js/main.js'))
   //.pipe(streamify(uglify()))
   
.pipe(gulp.dest('./'));
};
build()
});


Attachment(s):
Screen Shot 2015-12-01 at 11.02.38 AM.png
3 comments
Comment actions Permalink

Do you have this module installed in your project node_modules?

0
Comment actions Permalink

yes. attached a screenshot of my node_modules



Attachment(s):
Screen Shot 2015-12-01 at 3.25.27 PM.png
0
Comment actions Permalink

Hmm.. Works fine for me using your gulpfile.
What is your Node.js version? Gulp versions (both local and global)?
Please open your system terminal, cd to the project directory, then run exactly the same command as PHPStorm runs:

/usr/local/bin/node /usr/local/lib/node_modules/bin/gulp.js --gulpfile /path/to/your/gulpfile default

or whatever it looks like, and provide the screenshot of the output (terminal screenshot that shows both the command and the output)

0

Please sign in to leave a comment.