rizowski / eslint-watch

ESLint with simple watching capabilities
https://www.npmjs.com/package/eslint-watch
MIT License
196 stars 29 forks source link

esw --watch throws EPERM on Windows #137

Closed XuYan closed 5 years ago

XuYan commented 6 years ago

Environment

Basic Description of the problem

Run eslint-watch on a single file on Windows throws an EPERM exception

How to reproduce it

  1. Command: esw --watch client/errors.js

Debug output:

✓ Clean (16:00:23)

{ Error: watch client/errors.js EPERM
    at _errnoException (util.js:1003:13)
    at FSWatcher.start (fs.js:1397:19)
    at Object.fs.watch (fs.js:1423:11)
    at createFsWatchInstance (/mnt/e/IRIS/IRIS/Iris.Cloud/Iris.Web.Portal/node_modules/eslint-watch/node_modules/chokidar/lib/nodefs-handler.js:37:15)
    at setFsWatchListener (/mnt/e/IRIS/IRIS/Iris.Cloud/Iris.Web.Portal/node_modules/eslint-watch/node_modules/chokidar/lib/nodefs-handler.js:80:15)
    at FSWatcher.NodeFsHandler._watchWithNodeFs (/mnt/e/IRIS/IRIS/Iris.Cloud/Iris.Web.Portal/node_modules/eslint-watch/node_modules/chokidar/lib/nodefs-handler.js:229:14)
    at FSWatcher.NodeFsHandler._handleFile (/mnt/e/IRIS/IRIS/Iris.Cloud/Iris.Web.Portal/node_modules/eslint-watch/node_modules/chokidar/lib/nodefs-handler.js:256:21)
    at FSWatcher.<anonymous> (/mnt/e/IRIS/IRIS/Iris.Cloud/Iris.Web.Portal/node_modules/eslint-watch/node_modules/chokidar/lib/nodefs-handler.js:474:21)
    at FSReqWrap.oncomplete (fs.js:167:5)
  errno: 'EPERM',
  code: 'EPERM',
  syscall: 'watch client/errors.js',
  filename: 'client/errors.js' }
rizowski commented 6 years ago

I would try running the same command on a newer version of node 9. There have been bugs around accessing files in that node version.

XuYan commented 6 years ago

Thank you for your reply, rizowski! Just checked, the same exception is thrown on latest node v9.11.1 as well :(

rizowski commented 5 years ago

@XuYan Is this still an issue? I noticed that it was being ran in the Windows linux subsystem. Which microsoft has recently changed quite a bit around file system permissions by passing along metadata on mount.

rizowski commented 5 years ago

Closing this for now. If this is still an issue I am willing to reopen to discuss.