Mac 执行 gulp 报错:File not found

野性酷女 2022-12-07 15:26 290阅读 0赞
  • 问题描述:使用gulp的时候gulp.src传递的目录不存在而导致进程终止报错 Error: File not found with singular glob: d:/wamp/www/qc_h5/build (if this was purposeful, use allowEmpty option)

其实上面也已经说得很清除了哈,只需要添加 {allowEmpty: true} 就可以了

  1. gulp.task('dev-clean', function() {
  2. return gulp
  3. .src(devPath.buildPath, { allowEmpty: true})
  4. .pipe(clean());
  5. });

发表评论

表情:
评论列表 (有 0 条评论,290人围观)

还没有评论,来说两句吧...

相关阅读