browserify / watchify

watch mode for browserify builds
Other
1.79k stars 203 forks source link

Getting error at trying to run watchify #333

Closed kolyaio closed 5 years ago

kolyaio commented 7 years ago

I'm trying to run: watchify main.js -o bundle.js but instead of starting "watch" the file it's returning the next error: ` events.js:141 throw er; // Unhandled 'error' event ^

Error: watch /mnt/c/Users/Nikolai/hello/package.json EPERM at exports._errnoException (util.js:873:11) at FSWatcher.start (fs.js:1234:19) at Object.fs.watch (fs.js:1262:11) at createFsWatchInstance (/home/nick2il/.yarn-config/global/node_modules/chokidar/lib/nodefs-handler.js:37:15) at setFsWatchListener (/home/nick2il/.yarn-config/global/node_modules/chokidar/lib/nodefs-handler.js:80:15) at FSWatcher.NodeFsHandler._watchWithNodeFs (/home/nick2il/.yarn-config/global/node_modules/chokidar/lib/nodefs-handler.js:228:14) at FSWatcher.NodeFsHandler._handleFile (/home/nick2il/.yarn-config/global/node_modules/chokidar/lib/nodefs-handler.js:255:21) at FSWatcher. (/home/nick2il/.yarn-config/global/node_modules/chokidar/lib/nodefs-handler.js:473:21) at FSReqWrap.oncomplete (fs.js:82:15)`

The thing is that running: browserify main.js -o bundle.js This is actually works, and the file 'compiles'.

I'm using node 4.4.7 On No LSB modules are available. Distributor ID: Ubuntu Description: Ubuntu 14.04.4 LTS Release: 14.04 Codename: trusty With Windows on Bash.

ZenkStarr commented 7 years ago

+1

Same setup and behaviour as above.

goto-bus-stop commented 5 years ago

I assume it's because file watching was not implemented in the WSL back then: https://github.com/nodejs/node/issues/7496

In recent Windowses, it should work now. If not, please open a new issue!