【问题标题】:Gulp watch failing with Spawn EACCES errorGulp 手表因 Spawn EACCES 错误而失败
【发布时间】:2016-02-17 21:43:00
【问题描述】:

知道是什么导致了这个错误吗?

我的 Gulp Watch 声明:

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)

【问题讨论】:

    标签: node.js gulp build-process node-modules gulp-watch


    【解决方案1】:

    检查事项:

    • 文件权限(对监视的文件)
    • 是否有现有的gulp.watch 正在运行监视这些文件中的任何一个?
    • 是否正确安装了所有 NPM 依赖项(less、sass、browserify 等)?

    【讨论】:

    • 我做了,这个错误实际上是来自另一个开发者拉了最新的,原来问题是他没有安装sass!您能否升级您的答案以包括检查所有已安装的依赖项?
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2019-01-26
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多