babelify snippets

How to fix Gulp.js "Error: path must be a string"

Tagged javascript, gulp, babelify, browserify  Languages javascript

gulpfile.js:

...
  browserify({
    entries: [ './app/index.js' ],
    extensions: [ '.js', '.jsx' ],
    debug: true // Add sourcemaps
  })
  .transform(babelify()) // JSX and ES6 => JS
...

A close-up of the issue:

.transform(babelify()) // JSX and ES6 => JS

The solution:

.transform(babelify) // JSX and ES6 => JS