2015-11-16 71 views
1

任何想法是什么导致此错误?Gulp手表失败,产卵EACCES错误

我咕嘟咕嘟观看声明:

gulp.task('watch', function() { 

    gulp.watch('app/**/**/*.html', ['html-templates']).on('change', function(file) { 
     gutil.log(gutil.colors.yellow.bold('HTML updated' + ' (' + file.path + ')')); 
    }); 

    gulp.watch('app/assets/imgs/*.svg').on('change', function(file) { 
     gutil.log(gutil.colors.magenta('SVG updated' + ' (' + file.path + ')')); 
    }); 

    gulp.watch('bower_components/sass-smacss/sass/**/*.scss', ['app-css']).on('change', function(file) { 
     gutil.log(gutil.colors.cyan.bold('CSS updated' + ' (' + file.path + ')')); 
    }); 

    gulp.watch('highcharts/js/*.js', ['highcharts-js']).on('change', function(file) { 
     gutil.log(gutil.colors.red.bold('JavaScript updated' + ' (' + file.path + ')')); 
    }); 

    gulp.watch(paths.scripts, ['app-js']).on('change', function(file) { 
     gutil.log(gutil.colors.red.bold('JavaScript updated' + ' (' + file.path + ')')); 
    }); 
}); 

11:27:05] Error: spawn EACCES 
    at exports._errnoException (util.js:746:11) 
    at ChildProcess.spawn (child_process.js:1162:11) 
    at exports.spawn (child_process.js:995:9) 
    at spawn (/Users/username/dashboard/node_modules/gulp-ruby-sass/node_modules/win-spawn/index.js:54:10) 
    at module.exports (/Users/username/dashboard/node_modules/gulp-ruby-sass/index.js:89:13) 
    at Gulp.<anonymous> (/Users/username/dashboard/gulpfile.js:246:12) 
    at module.exports (/Users/username/dashboard/node_modules/gulp/node_modules/orchestrator/lib/runTask.js:34:7) 
    at Gulp.Orchestrator._runTask (/Users/username/dashboard/node_modules/gulp/node_modules/orchestrator/index.js:273:3) 
    at Gulp.Orchestrator._runStep (/Users/username/dashboard/node_modules/gulp/node_modules/orchestrator/index.js:214:10) 
    at Gulp.Orchestrator.start (/Users/username/dashboard/node_modules/gulp/node_modules/orchestrator/index.js:134:8) 

回答

1

检查事项:

  • 文件权限(在观看文件)
  • 有一个现有gulp.watch运行观望任何这些文件?
  • 是否正确安装了所有NPM依赖项(less,sass,browserify等)?
+0

我做了,错误实际上是从另一位开发人员那里得到最新的,结果问题是他没有安装'sass'!你可以升级你的答案,包括检查安装的所有依赖项吗? –

+1

啊,很好 - 更新了,谢谢! –