node.js - SyntaxError in plugin 'gulp-mocha' Unexpected token = -


i getting following error in travis-ci when using node 4.3.2:

syntaxerror in plugin 'gulp-mocha' unexpected token = 

everything works when using node 6, not 4.3.2. here stack trace:

[12:05:11] starting 'build'... [12:05:11] finished 'build' after 13 μs [12:05:11] starting 'tests'... syntaxerror in plugin 'gulp-mocha' message:     unexpected token = stack: syntaxerror: unexpected token =     @ exports.runinthiscontext (vm.js:53:16)     @ module._compile (module.js:373:25)     @ object.module._extensions..js (module.js:416:10)     @ module.load (module.js:343:32)     @ function.module._load (module.js:300:12)     @ module.require (module.js:353:17)     @ require (internal/module.js:12:17) 

this task running:

gulp.task('tests', ['build'], (cb) => {     if (haserror) {       cb();       return;     }      return gulp.src('build/test/**/*.js', {read: false})       .pipe(mocha())       .on("error", handleerror); }); 

how can correct this?

the older version of node being used, aws lambda application.


Comments

Popular posts from this blog

magento2 - Magento 2 admin grid add filter to collection -

Android volley - avoid multiple requests of the same kind to the server? -

Combining PHP Registration and Login into one class with multiple functions in one PHP file -