admin管理员组

文章数量:1394217

I'm stacked here with problem with gulp.src, which is only accepts String containing exact file like

gulp.src('index.html') 

or array of strings

gulp.src(['index.html', 'home.html', 'products.html'])

but can't handle

gulp.src('./*.html')  

or gulp.src(['*.html', './**/*.html']) which is I'm aiming to. I'm always getting this error is I put something different as argument from the first two line:

[15:48:46] Starting 'wiredep'...
[15:48:46] Finished 'wiredep' after 14 ms
events.js:160
  throw er; // Unhandled 'error' event
  ^

TypeError: First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.

Can somebody let me know what I'm doing wrong?

I'm stacked here with problem with gulp.src, which is only accepts String containing exact file like

gulp.src('index.html') 

or array of strings

gulp.src(['index.html', 'home.html', 'products.html'])

but can't handle

gulp.src('./*.html')  

or gulp.src(['*.html', './**/*.html']) which is I'm aiming to. I'm always getting this error is I put something different as argument from the first two line:

[15:48:46] Starting 'wiredep'...
[15:48:46] Finished 'wiredep' after 14 ms
events.js:160
  throw er; // Unhandled 'error' event
  ^

TypeError: First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.

Can somebody let me know what I'm doing wrong?

Share Improve this question asked Jan 27, 2017 at 14:57 VladynVladyn 5831 gold badge6 silver badges20 bronze badges
Add a ment  | 

1 Answer 1

Reset to default 6
gulp.src('./*.html')

and

gulp.src(['*.html', './**/*.html'])

are valid globs.

Maybe one of your .html file is empty and the wiredep plugin tries to load an undefined stream which causes the TypeError.

本文标签: