igorklopov / enclose

Compile your Node.js project into an executable
http://enclosejs.com
Other
936 stars 43 forks source link

Support fsevents #106

Closed derekstavis closed 7 years ago

derekstavis commented 8 years ago

Hi Igor. Awesome work on EncloseJS!

On OS X it's common to use the fsevents module to listen for file changes.

fsevents is a native module. Looks like currently we don't have a way to use it. When I try to compile something that uses it I get this message:

(...) /node_modules/chokidar/lib/fsevents-handler.js
  info  Cannot find module 'fsevents' from '(...) /node_modules/chokidar/lib'
igorklopov commented 8 years ago

Please check that you really have (...) /node_modules/fsevents directory. It is not installed if incompatible platform (non-OSX) detected.

igorklopov commented 8 years ago

npm WARN notsup Not compatible with your operating system or architecture: fsevents@1.0.12

derekstavis commented 8 years ago

You are right. I was trying to compile on a Linux machine. Having this said, I tried on a Mac. I found a strange behaviour with the watcher, that's why I believe fsevents isn't being used.

Compare the program log before and after enclose

Before:

watch: stalking /tmp/test
watch: directory added /tmp/test/foo
watch: stalking /tmp/test/foo
watch: directory added /tmp/test/foo/bar
watch: stalking /tmp/test/foo/bar
watch: directory added /tmp/test/foo/bar/qux
watch: stalking /tmp/test/foo/bar/qux
watch: file added /tmp/test/foo/bar/qux/this-is-brand-new.txt

After:

*** Evaluation version. Please subscribe to full version.
watch: stalking /tmp/test
watch: directory added /tmp/test/foo
watch: stalking /tmp/test/foo

Looks like the watcher isn't noticing files deep in the hierarchy. This is the same behaviour as when using useFsEvents: false in chokidar.

igorklopov commented 8 years ago

Ok. While compiling your project add --loglevel info to command line. And check that (...) /node_modules/fsevents is listed.

igorklopov commented 7 years ago

Dear users of EncloseJS! I highly encourage you to switch to https://github.com/zeit/pkg It is rewritten successor of EncloseJS. It is open source, and all improvements will go there. Please check if pkg has your issue unresolved, and if it is true, reopen your issue there: https://github.com/zeit/pkg/issues