Gulp.src 抛出 'First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.'
Gulp.src throws 'First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.'
我在这里遇到 gulp.src 的问题,它只接受包含
之类的确切文件的字符串
gulp.src('index.html')
或字符串数组
gulp.src(['index.html', 'home.html', 'products.html'])
但无法处理
gulp.src('./*.html')
或
gulp.src(['*.html', './**/*.html'])
这是我的目标。
我总是收到这个错误,因为我把一些不同于前两行的参数作为参数:
[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.
有人可以告诉我我做错了什么吗?
gulp.src('./*.html')
和
gulp.src(['*.html', './**/*.html'])
是有效的 glob。
也许您的 .html 文件之一是空的 并且 wiredep 插件尝试加载导致类型错误的未定义流。
我在这里遇到 gulp.src 的问题,它只接受包含
之类的确切文件的字符串gulp.src('index.html')
或字符串数组
gulp.src(['index.html', 'home.html', 'products.html'])
但无法处理
gulp.src('./*.html')
或 gulp.src(['*.html', './**/*.html']) 这是我的目标。 我总是收到这个错误,因为我把一些不同于前两行的参数作为参数:
[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.
有人可以告诉我我做错了什么吗?
gulp.src('./*.html')
和
gulp.src(['*.html', './**/*.html'])
是有效的 glob。
也许您的 .html 文件之一是空的 并且 wiredep 插件尝试加载导致类型错误的未定义流。