TypeScript Version: 2.0.0 (@beta)
Trying to use bash in Windows 10 for all my development. When running tsc -w on a Project with a tsconfig.json i get an error. This error exists even on an empty Project.
Expected behavior:
tsc -w should build the Project as normally. tsc works fine
Actual behavior:
an error is thrown:
emilekberg@ALDERAAN:/mnt/e/dev/test$ tsc --init
message TS6071: Successfully created a tsconfig.json file.
emilekberg@ALDERAAN:/mnt/e/dev/test$ tsc --w
fs.js:1431
throw error;
^
Error: watch /mnt/e/dev/test EPERM
at exports._errnoException (util.js:1012:11)
at FSWatcher.start (fs.js:1429:19)
at Object.fs.watch (fs.js:1456:11)
at Object.watchDirectory (/usr/lib/node_modules/typescript/lib/tsc.js:1475:32)
at Object.executeCommandLine (/usr/lib/node_modules/typescript/lib/tsc.js:38757:43)
at Object.<anonymous> (/usr/lib/node_modules/typescript/lib/tsc.js:39121:4)
at Module._compile (module.js:541:32)
at Object.Module._extensions..js (module.js:550:10)
at Module.load (module.js:458:32)
at tryModuleLoad (module.js:417:12)
emilekberg@ALDERAAN:/mnt/e/dev/test$
This doesn't really look like a TypeScript issue -- we're just calling fs.watch. What happens when you run require('fs').watch('/mnt/e/dev/test') from the node REPL?
You seem to be correct, the same behaviour is met.
emilekberg@ALDERAAN:/mnt/e/dev/test$ sudo nodejs
> 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 repl:1:15
at sigintHandlersWrap (vm.js:32:31)
at sigintHandlersWrap (vm.js:96:12)
at ContextifyScript.Script.runInContext (vm.js:31:12)
at REPLServer.defaultEval (repl.js:308:29)
at bound (domain.js:280:14)
at REPLServer.runBound [as eval] (domain.js:293:12)
Is this a config issue with what bash can access or? I tried with sudo as well, same result.
Most helpful comment
Check this uservoice out: https://wpdev.uservoice.com/forums/266908-command-prompt-console-bash-on-ubuntu-on-windo/suggestions/13469097-support-for-filesystem-watchers-like-inotify.