【问题标题】:gulp-clean: Cannot delete files outside the current working directorygulp-clean:无法删除当前工作目录之外的文件
【发布时间】:2017-03-24 11:05:22
【问题描述】:

在我的 Angular2 项目中,我运行命令:

gulp clean

即使我使用了,我也面临以下错误:

gulp clean --force but no success.

请谁能解释一下这个问题的根本原因是什么?我将不胜感激。

【问题讨论】:

    标签: node.js angular gulp


    【解决方案1】:

    您可以在gulpfile.js 中调用clean() 时将force 选项设置为true。 例如:

    gulp.task('clean', function () {
      return gulp.src(
        ['***your filename/folder here***'],
        {read: false}
      )
        .pipe(clean({force: true})); // this is force option
    });
    

    【讨论】:

      【解决方案2】:

      我相信你必须在你的 gulp 任务中将 force 设置为 true

      https://www.npmjs.com/package/gulp-clean

      【讨论】:

        猜你喜欢
        • 2016-09-13
        • 2018-05-18
        • 1970-01-01
        • 1970-01-01
        • 2021-09-16
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 2012-03-20
        相关资源
        最近更新 更多