在 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)
如何gulp.watch
在 Windows 上的 Ubuntu 上使用 Bash?