【问题标题】:Gulp Build command is failing with error " EISDIR: Illegal operation on directory"Gulp Build 命令失败并出现错误“EISDIR:目录上的非法操作”
【发布时间】:2018-10-10 01:30:06
【问题描述】:

我正在尝试为服务器上的开发环境运行 gulp 构建任务,但它失败了。但是,相同的 gulp 版本正在我的本地计算机上运行。下面给出函数和错误。

功能:

// S3 Upload for dev
gulp.task('s3sync:dev', function () {
var config = {
    accessKeyId: "-Key-",
    secretAccessKey: "-Key-"
};

var s3 = require('gulp-s3-upload')(config);

  return gulp.src("./dist/**")
    .pipe(s3({
        Bucket: 'example',
        ACL: 'public-read'
    }, {
        maxRetries: 5
  }))
});

命令:

Gulp build:development

错误:

[09:01:04] Starting 's3sync:dev'...
events.js:160
      throw er; // Unhandled 'error' event
      ^

Error: EISDIR: illegal operation on a directory, read
    at Error (native)

有什么想法吗?

【问题讨论】:

    标签: gulp


    【解决方案1】:

    最后,这个问题已通过从 capistrano 中删除部署后创建的系统符号链接解决,该系统符号链接也在 npm 命令下运行。

    npm run clean && npm run build
    

    删除系统文件后。我已经运行了下面的命令,它工作正常。

    gulp build:development
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2019-01-06
      • 1970-01-01
      • 2021-07-13
      • 2020-07-25
      • 2021-06-20
      • 2020-04-12
      • 2022-01-03
      • 1970-01-01
      相关资源
      最近更新 更多