Error Messages on Windows
manngo opened this issue · 3 comments
I successfully use this package on Macintosh, and find it to be a real help. However, on Windows, I get a JavaScript error. Not one, but very many:
Uncaught Exception:
Error: EISDIR: illegal operation on a directory, watch 'G:\'
at FSWatcher.start …
Uncaught Exception:
Error: EISDIR: illegal operation on a directory, watch 'G:\content'
at FSWatcher.start …
My project folder is mapped to G:\
and I get a separate message for the root and for every file & folder inside it, which is tedious.
The problem disappears when I comment out the line:
require('electron-reload')(__dirname);
I am running WIndows 10 in a virtual machine (VirtualBox). The project folder is one which has been shared from my Mac. I test it using npm start
.
I am new to Electron development, so I have no idea whether I’m doing something improperly.
This is most probably a bug with chokidar
, the only dependency of this project. You could try to use chokidar
on its own on windows and see what happens.
I ran the following code from cokidar
’s site:
const chokidar = require('chokidar');
chokidar.watch('.', {ignored: /(^|[\/\\])\../}).on('all', (event, path) => {
console.log(event, path);
});
Certainly it gives me the same errors.
Does that mean I can’t use it on Windows?
For now, I am running the followng:
if(DEVELOPMENT && process.platform == 'darwin') require('electron-reload')(__dirname);
Sorry, I don't know why it doesn't work. It may also be caused by a misconfiguration of your virtual machine.