1. 程式人生 > 其它 >2.7 執行gulp的task任務,報Error: File not found

2.7 執行gulp的task任務,報Error: File not found

技術標籤:NodejsFile not foundgulp報錯not found

一、在執行gulp rename任務時報錯

二、新增allowEmpty引數即可

gulp.task("rename",function (){
    var stream = gulp.src('./js/hello.txt',{allowEmpty: true})
        .pipe(rename('./js/goodbye.md'))
        .pipe(gulp.dest('./dist'))

    return stream
})