3

I can catch errors from Browserify (as shown by other SO posts on this topic), however I need to see the specific code causing the error. Example:

Error: Parsing file /public/javascripts/lib/fake_7af951da.js: 
Line 10: Spread must be the final element of an element list //<--? need details

I want to output to the console the specific code in the fake_.js file that is causing the error, or I need to be able to view the fake_.js file so that I can look at Line 10.

Here is my gulp info:

gulp.task('browserify', function() {
    // Single entry point to browserify
    gulp.src('./public/javascripts/lib/*.js') //lists files to require
        .pipe(browserify({
            insertGlobals : true,
            debug : !gulp.env.production
        }))
        .on('error', function(err){
    console.log(err.stack);  
  })
        .pipe(gulp.dest('./public/javascripts/out.js'))
});
Ron I
  • 4,090
  • 8
  • 33
  • 64

0 Answers0