【发布时间】:2016-08-12 02:08:23
【问题描述】:
在 Windows 上的 Ubuntu 上的 Bash,像这样的 gulp 任务;
gulp.task('default', function() {
gulp.watch('./', function() {console.log('change!')});
});
或者直接从节点调用fs.watch;
node -e "require('fs').watch('./')"
两个都失败了;
Error: watch ./ EPERM
at exports._errnoException (util.js:1012:11)
at FSWatcher.start (fs.js:1429:19)
at Object.fs.watch (fs.js:1456:11)
at [eval]:1:15
at ContextifyScript.Script.runInThisContext (vm.js:25:33)
at Object.exports.runInThisContext (vm.js:77:17)
at Object.<anonymous> ([eval]-wrapper:6:22)
at Module._compile (module.js:541:32)
at bootstrap_node.js:315:29
at _combinedTickCallback (internal/process/next_tick.js:67:7)
如何在 Windows 上的 Ubuntu 上的 Bash 下使用 gulp.watch?
【问题讨论】:
标签: windows bash gulp gulp-watch windows-subsystem-for-linux