简体   繁体   English

Gulp怎么了?

[英]What's wrong with Gulp?

could please somebody tell me, what is 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,
        }));
});

When running gulp watch, get 运行gulp手表时,获取

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

What's wrong? 怎么了? Thanks. 谢谢。

It seems you dont have permissions to scan the folder youre specifying. 看来您没有扫描您指定的文件夹的权限。

Try the following 尝试以下

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

The root / of the file system is replaced with ./ , the relative current folder. 文件系统的根目录/被相对的当前文件夹./替换。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM