簡體   English   中英

Gulp怎么了?

[英]What's wrong with Gulp?

能否請別人告訴我,古爾普到底怎么了?

gulp.task('watch', function () {
    gulp.watch('./scss/**/*', ['scss']);
    gulp.src('/')
        .pipe(webserver({
            fallback: 'index.html',
            livereload: true,
            directoryListing: {
                enable: true,
                path: '/'
            },
            open: false,
        }));
});

運行gulp手表時,獲取

Error: EACCES: permission denied, scandir '/tmp/KSOutOfProcessFetcher.0.ppfIhqX0vjaTSb8AJYobDV7Cu68='
at Error (native)

怎么了? 謝謝。

看來您沒有掃描您指定的文件夾的權限。

嘗試以下

gulp.task('watch', function () {
  gulp.watch('./scss/**/*', ['scss']);
  gulp.src('./')
      .pipe(webserver({
          fallback: 'index.html',
          livereload: true,
          directoryListing: {
            enable: true,
            path: './'
        },
        open: false,
    }));
});

文件系統的根目錄/被相對的當前文件夾./替換。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM