Giter Site home page Giter Site logo

c4milo / node-inotify Goto Github PK

View Code? Open in Web Editor NEW
243.0 11.0 39.0 555 KB

Inotify bindings for Node.JS

Home Page: http://c4milo.github.io/node-inotify

License: MIT License

Python 1.19% JavaScript 13.99% C++ 84.83%
inotify watch nodejs node-inotify linux

node-inotify's People

Contributors

ashthespy avatar bingalls-compete avatar c4milo avatar claws avatar edsadr avatar estliberitas avatar frozencow avatar gitter-badger avatar ikokostya avatar mscdex avatar obiwahn avatar reimunotmoe avatar wankdanker avatar yannickcr avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

node-inotify's Issues

I can't find the module 'inotify'.

hefr-laptop node-inotify # node example.js
The 'sys' module is now called 'util'. It should have a similar interface.

node.js:50
throw e; // process.nextTick error, or 'error' event on first tick
^
Error: Cannot find module 'inotify'
at loadModule (node.js:229:13)
at require (node.js:262:14)
at Object. (/home/hefr/node-inotify/example.js:5:11)
at Module._compile (node.js:316:23)
at Object..js (node.js:324:12)
at Module.load (node.js:250:25)
at Object.runMain (node.js:338:24)
at Array. (node.js:588:12)
at EventEmitter._tickCallback (node.js:42:22)
at node.js:604:9

npm version upgrade for node v0.8 testing

I recently submitted a pull request for a branch which adds explicit nan scoping for v8 exceptions as newer v8 implementations require a V8::Isolate context to hold thread state. Use of the deprecated interfaces without an Isolate context generate an annoying compiler warning on newer node implementations. Since node is singled threaded the default Isolate context works fine and the Nan wrapper library handles this.

After I submitted my pull request travis reported that the build was failing. So I hooked up travis and installed nvm (very handy!) and found that my suggested changes compile and execute example.js fine on node v0.8.

Looking more closely at the travis log files I saw that the error in the node v0.8 case was coming out of npm not the complier. I don't think that my changes are introducing the build error but rather the error was latent in the travis test environment and triggered by my pull request .

The command "eval npm install " failed. 

module.js:340
    throw err;
      ^
Error: Cannot find module 'are-we-there-yet'
    at Function.Module._resolveFilename (module.js:338:15)
    at Function.Module._load (module.js:280:25)
    at Module.require (module.js:362:17)
    at require (module.js:378:17)
   at Object.<anonymous> (/home/travis/.nvm/v0.8.28/lib/node_modules/npm/node_modules/npmlog/log.js:2:16)
   at Module._compile (module.js:449:26)
   at Object.Module._extensions..js (module.js:467:10)"nan": "^2.0.5"
   at Module.load (module.js:356:32)
   at Function.Module._load (module.js:312:12)
   at Module.require (module.js:362:17)

I tested this suspicion with a hack to package.json c changing nan version description from "nan": "^2.0.5" to "nan": ">=2.05". Build works fine with the backward compatible npm syntax.

Suggestion on how to proceed welcome!

Best Regards,
Peter

addWatch callback overrides callback passed in previous addWatch call

In the following snippet:

this.queueWatch = this.inotify.addWatch({
    "path" : this.config.queueDir,
    "watch_for" : Inotify.IN_ALL_EVENTS,
    "callback" : function(event){
        sys.puts("INOTIFY1");
    }
});

this.outgoingWatch = this.inotify.addWatch({
    "path":this.config.outgoingDir,
    "watch_for" : Inotify.IN_ALL_EVENTS,
    "callback" : function(event){
        sys.puts("INOTIFY2");
    }
});

queue and outgoing are separate directories. However, adding a file to queue results in INOTIFY2 displaying, not INOTIFY1 as I would expect. Furthermore, if I create a second Inotify() instance (this.inotify2) and add the second watch to that, I get the correct behaviour for "queue". Unfortunately, "outgoing" fails to respond to changes in that directory in either case.

gyp: Call to 'node -e "require('nan')"' returned exit status 1 while in binding.gyp. while trying to load binding.gyp

Hello,

[root@jenkinsit node-inotify]# node-gyp rebuild
gyp info it worked if it ends with ok
gyp info using [email protected]
gyp info using [email protected] | linux | x64
gyp info spawn /usr/bin/python2
gyp info spawn args [ '/usr/lib/node_modules/node-gyp/gyp/gyp_main.py',
gyp info spawn args   'binding.gyp',
gyp info spawn args   '-f',
gyp info spawn args   'make',
gyp info spawn args   '-I',
gyp info spawn args   '/root/node-inotify/build/config.gypi',
gyp info spawn args   '-I',
gyp info spawn args   '/usr/lib/node_modules/node-gyp/addon.gypi',
gyp info spawn args   '-I',
gyp info spawn args   '/root/.node-gyp/6.5.0/include/node/common.gypi',
gyp info spawn args   '-Dlibrary=shared_library',
gyp info spawn args   '-Dvisibility=default',
gyp info spawn args   '-Dnode_root_dir=/root/.node-gyp/6.5.0',
gyp info spawn args   '-Dnode_gyp_dir=/usr/lib/node_modules/node-gyp',
gyp info spawn args   '-Dnode_lib_file=node.lib',
gyp info spawn args   '-Dmodule_root_dir=/root/node-inotify',
gyp info spawn args   '--depth=.',
gyp info spawn args   '--no-parallel',
gyp info spawn args   '--generator-output',
gyp info spawn args   'build',
gyp info spawn args   '-Goutput_dir=.' ]
module.js:457
    throw err;
    ^

Error: Cannot find module 'nan'
    at Function.Module._resolveFilename (module.js:455:15)
    at Function.Module._load (module.js:403:25)
    at Module.require (module.js:483:17)
    at require (internal/module.js:20:19)
    at [eval]:1:1
    at ContextifyScript.Script.runInThisContext (vm.js:25:33)
    at Object.exports.runInThisContext (vm.js:77:17)
    at Object.<anonymous> ([eval]-wrapper:6:22)
    at Module._compile (module.js:556:32)
    at bootstrap_node.js:357:29
gyp: Call to 'node -e "require('nan')"' returned exit status 1 while in binding.gyp. while trying to load binding.gyp
gyp ERR! configure error 
gyp ERR! stack Error: `gyp` failed with exit code: 1
gyp ERR! stack     at ChildProcess.onCpExit (/usr/lib/node_modules/node-gyp/lib/configure.js:305:16)
gyp ERR! stack     at emitTwo (events.js:106:13)
gyp ERR! stack     at ChildProcess.emit (events.js:191:7)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:215:12)
gyp ERR! System Linux 2.6.32-276.el6.x86_64
gyp ERR! command "/usr/bin/node" "/usr/bin/node-gyp" "rebuild"
gyp ERR! cwd /root/node-inotify
gyp ERR! node -v v6.5.0
gyp ERR! node-gyp -v v3.4.0
gyp ERR! not ok 

Using Red Hat Enterprise Linux Server release 6.3

Fails to install on 0.5.10 and 0.6.0

Trying to install node-inotify via:

npm install inotify

and via download

node-waf configure build

fails with:


node-waf configure build
Checking for program g++ or c++          : /usr/bin/g++
Checking for program cpp                 : /usr/bin/cpp
Checking for program ar                  : /usr/bin/ar
Checking for program ranlib              : /usr/bin/ranlib
Checking for g++                         : ok
Checking for node path                   : ok /usr/local/lib/node
Checking for node prefix                 : ok /usr/local
Checking for program node                : /usr/local/bin/node
Checking for function inotify_init       : yes
'configure' finished successfully (0.236s)
Waf: Entering directory `/root/c4milo-node-inotify-351983a/build'
[1/3] cxx: src/bindings.cc -> build/Release/src/bindings_1.o
[2/3] cxx: src/node_inotify.cc -> build/Release/src/node_inotify_1.o
In file included from ../src/bindings.cc:2:
../src/bindings.h:8: error: expected class-name before '{' token
../src/bindings.cc: In static member function 'static void NodeInotify::Inotify::Initialize(v8::Handle<v8::Object>)':
../src/bindings.cc:23: error: 'EventEmitter' has not been declared
../src/bindings.cc: In constructor 'NodeInotify::Inotify::Inotify()':
../src/bindings.cc:82: error: class 'NodeInotify::Inotify' does not have any field named 'EventEmitter'
../src/bindings.cc: In constructor 'NodeInotify::Inotify::Inotify(bool)':
../src/bindings.cc:88: error: class 'NodeInotify::Inotify' does not have any field named 'EventEmitter'
../src/bindings.cc: In static member function 'static v8::Handle<v8::Value> NodeInotify::Inotify::New(const v8::Arguments&)':
../src/bindings.cc:131: error: 'class NodeInotify::Inotify' has no member named 'Wrap'
../src/bindings.cc:139: error: 'class NodeInotify::Inotify' has no member named 'Ref'
../src/bindings.cc: In static member function 'static v8::Handle<v8::Value> NodeInotify::Inotify::AddWatch(const v8::Arguments&)':
../src/bindings.cc:191: error: 'class NodeInotify::Inotify' has no member named 'handle_'
../src/bindings.cc: In static member function 'static v8::Handle<v8::Value> NodeInotify::Inotify::Close(const v8::Arguments&)':
../src/bindings.cc:240: error: 'class NodeInotify::Inotify' has no member named 'Unref'
../src/bindings.cc: In static member function 'static void NodeInotify::Inotify::Callback(ev_loop*, ev_io*, int)':
../src/bindings.cc:273: error: 'class NodeInotify::Inotify' has no member named 'Ref'
../src/bindings.cc:274: error: 'class NodeInotify::Inotify' has no member named 'handle_'
../src/bindings.cc:277: error: 'class NodeInotify::Inotify' has no member named 'handle_'
../src/bindings.cc:278: error: 'class NodeInotify::Inotify' has no member named 'Unref'
../src/bindings.cc:283: error: 'class NodeInotify::Inotify' has no member named 'handle_'
In file included from ../src/node_inotify.cc:2:
../src/bindings.h:8: error: expected class-name before '{' token
Waf: Leaving directory `/root/c4milo-node-inotify-351983a/build'
Build failed:
 -> task failed (err #1):
        {task: cxx bindings.cc -> bindings_1.o}
 -> task failed (err #1):
        {task: cxx node_inotify.cc -> node_inotify_1.o}

No OSX (Darwin) support?

Tried to install another module, that clearly relies somewhere on inotify.

I get this error:

pm ERR! Darwin 16.6.0
npm ERR! argv "/Users/alexgurr/.nvm/versions/node/v6.10.3/bin/node" "/Users/alexgurr/.nvm/versions/node/v6.10.3/bin/npm" "install" "--save" "dev" "@storybook/cli"
npm ERR! node v6.10.3
npm ERR! npm v3.10.10
npm ERR! code EBADPLATFORM

npm ERR! notsup Unsupported platform for [email protected]: wanted {"os":"linux","arch":"any"} (current: {"os":"darwin","arch":"x64"})
npm ERR! notsup Valid OS: linux
npm ERR! notsup Valid Arch: any
npm ERR! notsup Actual OS: darwin
npm ERR! notsup Actual Arch: x64

Does iNotify not support OS X?

build fail in osx 10.7 / node 0.6.10

Here is the config.log:

project node-inotify (0.2.2) configured on Wed Feb 8 18:32:43 2012 by

waf 1.5.16 (abi 7, python 20701f0 on darwin)

using /usr/local/bin/node-waf configure build


Checking for program g++ or c++
find program=['g++', 'c++'] paths=[] var='CXX'
-> '/usr/bin/g++'


Checking for program cpp
find program=['cpp'] paths=[] var='CPP'
-> '/usr/bin/cpp'


Checking for program ar
find program=['ar'] paths=[] var='AR'
-> '/usr/bin/ar'


Checking for program ranlib
find program=['ranlib'] paths=[] var='RANLIB'
-> '/usr/bin/ranlib'


Checking for g++
ok


Checking for node path
not found


Checking for node prefix
ok /usr/local


Checking for program node
find program=['node'] paths=[] var='NODE'
-> '/usr/local/bin/node'


Checking for function inotify_init
==>

include <sys/inotify.h>

int main() {
void *p;
p=(void*)(inotify_init);
return 0;

}

<==
[1/2] �[32mcxx: build/.conf_check_0/test.cpp -> build/.conf_check_0/testbuild/Release/test_1.o
�[0m../test.cpp:1:25: error: sys/inotify.h: No such file or directory
../test.cpp: In function ‘int main()’:
../test.cpp:5: error: ‘inotify_init’ was not declared in this scope
['/usr/bin/g++', '-g', '../test.cpp', '-c', '-o', 'Release/test_1.o']
command returned 'Build failed: -> task failed (err #1): \n\t{task: cxx test.cpp -> test_1.o}'not found

second watch does not get called

Hey,

Given:

this.queueWatch = this.inotify.addWatch({
    "path" : this.config.queueDir,
    //"watch_for" : Inotify.IN_CLOSE_WRITE | Inotify.IN_MOVE_SELF,
    "watch_for" : Inotify.IN_ALL_EVENTS,
    "callback" : function(ev){
            });

this.outgoingWatch = this.inotify.addWatch({
    "path":this.config.outgoingDir,
    "watch_for" : Inotify.IN_ALL_EVENTS,
    //"watch_for" : Inotify.IN_CLOSE_WRITE | Inotify.IN_MOVE_SELF,
    "callback" : function(ev){
        sys.puts("INOTIFY2");
    }
});

The second callback is no longer overriding the first.
However, the second watch callback never gets called when I add files to the outgoing directory.

Wrong watch descriptor inside IN_DELETE_SELF

It looks like this event's object holds the watch descriptor associated with the parent directory, not for the directory that was just deleted. Basically it returns the same data as IN_DELETE

npm installation fails on node 0.9.1

Installation via npm install fails on my node 0.9 system due to node-waf not being available. This has been fixed with c67a30a, but that commit hasn't been released to npmregistry yet.

Releasing the current head should fix the problem.

Test for active handle can run over delete()'d poll handle and lead to process termination

Node version: 0.8.11

In destructor of Inotify there is such line:

assert(!uv_is_active((uv_handle_t *) read_watcher));

From the other side there is callback which is called after poll handle is closed - Inotify::on_handle_close:

void Inotify::on_handle_close(uv_handle_t* handle) {
    assert(!uv_is_active(handle));
    delete handle;
}

So, if Inotify::on_handle_close is called (for example after uv_close() in Inotify::Close()), memory of handle gets released and can be replaced by any other object. So mentioned assertion can fail. And this leads to program termination:

node: ../src/bindings.cc:109: virtual NodeInotify::Inotify::~Inotify(): Assertion `!uv_is_active((uv_handle_t *) read_watcher)' failed.

watch mounted file systems

no events are fired on the file systems mounted under root /mnt/ as a user do you have to be the owner of the location for the events be to fired? Thanks.

There are several events that aren't registering - Reported by AJ ONeal

There are several events that aren't registering with my tests:

At least IN_MOVE, IN_MOVED_TO, IN_MOVED_FROM, and IN_DELETE, maybe more.

I added this to the example in the readme and change the directory, of course

} else if(mask & Inotify.IN_MOVED_FROM) {
    sys.puts(type + 'was moved from');
} else if(mask & Inotify.IN_MOVED_TO) {
    sys.puts(type + 'was moved to');

Here's my test

!/bin/bash

mkdir test-inotify
node test-inotify.js > output.txt &
sleep 1;
cd test-inotify
touch foo
mv foo ../
mv ../foo ./
mv foo bar
rm bar
cd ../
rm test-inotify -rf

Output:

File foo was opened
File foo opened for writing was closed
Directory was opened
Directory opened for reading was closed
File watch was removed

any ideas as to why that would be?

I installed inotify-tools and ran inotifywatch ./test-inotify to make sure it wasn't a problem with my architecture or file system

inotifywatch -r test-inotify
Establishing watches...
Finished establishing watches, now collecting statistics.
total attrib close_write open moved_from moved_to create delete filename
9 1 1 1 2 2 1 1 test-inotify/

Does not build

Hello!

I'm trying to npm install it and I get this error:

$ sudo -E npm install inotify
npm info it worked if it ends with ok
npm info using [email protected]
npm info using [email protected]
npm ERR! sudon't! 
npm ERR! sudon't! Running npm as root is not recommended!
npm ERR! sudon't! Seriously, don't do this!
npm ERR! sudon't!
npm info preinstall [email protected]
npm info install [email protected]
Checking for program g++ or c++          : /usr/bin/g++ 
Checking for program cpp                 : /usr/bin/cpp 
Checking for program ar                  : /usr/bin/ar 
Checking for program ranlib              : /usr/bin/ranlib 
Checking for g++                         : ok  
Checking for node path                   : not found 
Checking for node prefix                 : ok /usr/local 
Checking for program node                : /usr/local/bin/node 
Checking for function inotify_init       : yes 
'configure' finished successfully (0.094s)
Waf: Entering directory `/usr/local/lib/node/.npm/inotify/0.1.6/package/build'
[1/3] cxx: src/node_inotify.cc -> build/default/src/node_inotify_1.o
[2/3] cxx: src/bindings.cc -> build/default/src/bindings_1.o
../src/bindings.cc: In static member function ‘static v8::Handle<v8::Value> NodeInotify::Inotify::New(const v8::Arguments&)’:
../src/bindings.cc:113: error: ‘IN_NONBLOCK’ was not declared in this scope
../src/bindings.cc:113: error: ‘IN_CLOEXEC’ was not declared in this scope
../src/bindings.cc:113: error: ‘inotify_init1’ was not declared in this scope
Waf: Leaving directory `/usr/local/lib/node/.npm/inotify/0.1.6/package/build'
Build failed:  -> task failed (err #1): 
        {task: cxx bindings.cc -> bindings_1.o}
npm info [email protected] Failed to exec install script
npm ERR! install failed Error: [email protected] install: `node-waf configure build`
npm ERR! install failed `sh` failed with 1
npm ERR! install failed     at ChildProcess.<anonymous> (/usr/local/lib/node/.npm/npm/0.2.14-6/package/lib/utils/exec.js:25:18)
npm ERR! install failed     at ChildProcess.emit (events.js:45:17)
npm ERR! install failed     at ChildProcess.onexit (child_process.js:165:12)
npm info install failed rollback
npm info uninstall [ '[email protected]' ]
npm info preuninstall [email protected]
npm info uninstall [email protected]
npm info auto-deactive not symlink
npm info postuninstall [email protected]
npm info uninstall [email protected] complete
npm info install failed rolled back
npm ERR! Error: [email protected] install: `node-waf configure build`
npm ERR! `sh` failed with 1
npm ERR!     at ChildProcess.<anonymous> (/usr/local/lib/node/.npm/npm/0.2.14-6/package/lib/utils/exec.js:25:18)
npm ERR!     at ChildProcess.emit (events.js:45:17)
npm ERR!     at ChildProcess.onexit (child_process.js:165:12)
npm ERR! 
npm ERR! Failed at the [email protected] install script.
npm ERR! This is most likely a problem with the inotify package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     node-waf configure build
npm ERR! You can get their info via:
npm ERR!     npm owner ls inotify
npm ERR! There may be additional logging output above.
npm not ok

Here is my environment:

$ uname -a
Linux sgoian.tacitknowledge.com 2.6.18-194.32.1.el5 #1 SMP Wed Jan 5 17:52:25 EST 2011 x86_64 x86_64 x86_64 GNU/Linux
$ node -v
v0.3.5-pre

Is there something I can do to fix this?

Update to be compatible with node 0.8

In node 0.8, the IO eventing API seems to have changed.

In bindings.cc, changes are gonna have to be made to be compatible with this change.

The old ev_io__(...) functions have been replaced with a new uv_poll__() API. We're getting some very strange behaviour when parsing large amounts of files using node-inotify. We get a very cryptic:

undefined:0


TypeError: undefined is not a function

This happens sporadically, and usually works for the first run of files, but starts failing afterwards.

You also get a

WARNING: ev_io is deprecated, use uv_poll_t

deprecation warning at the start.

Here is a good link about migrating: https://github.com/joyent/node/wiki/How-to-migrate-from-ev_io_*-to-uv_poll_*-for-IO-polling

I'm just a bit pressed for time so we'll continue with 0.6 for now, otherwise I would have made the changes myself. But anyway, here is the info for future reference.

Inotify destructor can cause libuv assertion failure

Node version: 0.8.11

I found that uv_poll_stop() can be called twice in the lifecycle of Inotify class. For example, we call Inotify::Close(), and then GC handles object and calls Inotify::~Inotify().

Calling of uv_poll_stop() for one poll handle causes assertion failure and as result program crashes. For example: https://github.com/joyent/libuv/blob/master/src/unix/poll.c#L78

int uv_poll_stop(uv_poll_t* handle) {
  assert(!(handle->flags & (UV_CLOSING | UV_CLOSED)));
  uv__poll_stop(handle);
  return 0;
}

Here is stack trace:

node: ../deps/uv/src/unix/poll.c:80: uv_poll_stop: Assertion `!(handle->flags & (UV_CLOSING | UV_CLOSED))' failed.

Program received signal SIGABRT, Aborted.
0xb7d60577 in raise () from /lib/libc.so.6
(gdb) bt
#0  0xb7d60577 in raise () from /lib/libc.so.6
#1  0xb7d63962 in abort () from /lib/libc.so.6
#2  0xb7d59767 in __assert_fail () from /lib/libc.so.6
#3  0x0822776c in uv_poll_stop (handle=0x0) at ../deps/uv/src/unix/poll.c:80
#4  0xb7c7d54e in ~Inotify (this=0x87b7350, __in_chrg=<value optimized out>) at ../src/bindings.cc:102
#5  0x083756d8 in v8::internal::GlobalHandles::PostGarbageCollectionProcessing(v8::internal::GarbageCollector) ()
#6  0x0877d618 in ?? ()

addWatch returns -1

I'm trying to watch directories for changes, and if some file in that directory changes, to execute an command: https://gist.github.com/c6c790d92d82cab91dfc

Only problem is that when running this only the first 6 directories are watched, and all others are not, and inotify.addWatch returns -1 even though I'm pretty sure there's nothing special with those directories.

Any idea how to solve this problem?

Add docker with Vagrant or remove Vagrant

Hey,
Vagrant is very useful but he is heavy if you compare with Docker.

Add this:
Dockerfile

FROM node:6

ENV NPM_CONFIG_LOGLEVEL warn

WORKDIR /usr/src/inotify
COPY . .

RUN yarn add -D node-gyp

docker-compose.yml

version: '2'

services: 
  node:
    build: .
    command: yarn test

And run this:

$ docker-compose up

If you wish keep Vagrant, you can use docker like provider (Vangrant version >= 1.6).
Here.

npm install failes

dont know if anyone knows this, but I get an error when I use npm to install

#include <sys/inotify.h>
     ^
1 error generated.
make: *** [Release/obj.target/inotify/src/bindings.o] Error 1
gyp ERR! build error 
gyp ERR! stack Error: `make` failed with exit code: 2

gyp ERR! stack at ChildProcess.onExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:267:23)
gyp ERR! stack at ChildProcess.EventEmitter.emit (events.js:98:17)
gyp ERR! stack at Process.ChildProcess._handle.onexit (child_process.js:789:12)
gyp ERR! System Darwin 12.4.0
gyp ERR! command "node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /Applications/XAMPP/xamppfiles/htdocs/GSP/clients/doritos/BuyABag/share-station-web/node_modules/inotify
gyp ERR! node -v v0.10.21
gyp ERR! node-gyp -v v0.10.10
gyp ERR! not ok
npm ERR! weird error 1
npm ERR! not ok code 0

does not install on [email protected] ;-(

npm info using [email protected]
npm info using [email protected]
npm info fetch http://registry.npmjs.org/inotify/-/inotify-0.1.6.tgz
npm info calculating sha1 /home/payload/lib/node/.npm/.cache/inotify/0.1.6/package.tgz
npm info shasum ddddbffaf38e0e14793b0df782971ed0a195000e
npm info preinstall [email protected]
npm info install [email protected]
sh: node-waf: not found
npm info [email protected] Failed to exec install script
npm ERR! install failed Error: [email protected] install: `node-waf configure build`
npm ERR! install failed `sh` failed with 127
npm ERR! install failed     at ChildProcess.<anonymous> (/home/payload/lib/node/.npm/npm/0.2.14-6/package/lib/utils/exec.js:25:18)
npm ERR! install failed     at ChildProcess.emit (events.js:34:17)
npm ERR! install failed     at ChildProcess.onexit (child_process.js:164:12)
npm info install failed rollback
npm info uninstall [ '[email protected]' ]
npm info preuninstall [email protected]
npm info uninstall [email protected]
npm info auto-deactive not symlink
npm info postuninstall [email protected]
npm info uninstall [email protected] complete
npm info install failed rolled back
npm ERR! Error: [email protected] install: `node-waf configure build`
npm ERR! `sh` failed with 127
npm ERR!     at ChildProcess.<anonymous> (/home/payload/lib/node/.npm/npm/0.2.14-6/package/lib/utils/exec.js:25:18)
npm ERR!     at ChildProcess.emit (events.js:34:17)
npm ERR!     at ChildProcess.onexit (child_process.js:164:12)
npm ERR! 
npm ERR! Failed at the [email protected] install script.
npm ERR! This is most likely a problem with the inotify package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     node-waf configure build

deprecation warning with nodev8

it's a warning only so far in v8; but will need to change sooner or later

> [email protected] install /path/to/.../node_modules/inotify
> node-gyp rebuild

make: Entering directory `/path/to/.../node_modules/inotify/build'
  CXX(target) Release/obj.target/inotify/src/bindings.o
  CXX(target) Release/obj.target/inotify/src/node_inotify.o
../src/node_inotify.cc: In function ‘void NodeInotify::InitializeInotify(v8::Handle<v8::Object>)’:
../src/node_inotify.cc:13:60: warning: ‘static v8::Local<v8::ObjectTemplate> v8::ObjectTemplate::New()’ is deprecated (declared at /.../.node-gyp/8.5.0/include/node/v8.h:5611): Use isolate version [-Wdeprecated-declarations]
         Local<ObjectTemplate> global = ObjectTemplate::New();
                                                            ^
  SOLINK_MODULE(target) Release/obj.target/inotify.node
  COPY Release/inotify.node
make: Leaving directory `/.../.node_modules/inotify/build'

+ [email protected]
added 16 packages in 7.052s

Example does not work out of the box

When I run your example exactly, I get this error:

var inotify = new Inotify(); //persistent by default, new Inotify(false) //no 
              ^
TypeError: undefined is not a function
    at Object.<anonymous> (/home/mbayazit/grunt-autodeploy/chok.js:3:15)
    at Module._compile (module.js:456:26)
    at Object.Module._extensions..js (module.js:474:10)
    at Module.load (module.js:356:32)
    at Function.Module._load (module.js:312:12)
    at Function.Module.runMain (module.js:497:10)
    at startup (node.js:119:16)
    at node.js:901:3

I tried installing it both from npm and via git.

Running just this console.log(require('inotify')); returns an empty object {}.

Tested on Ubuntu.

Is there a way use this module in Windows? it occurs build error.

Only for Linux?
I am using node.js in Windows.
I want to watch folder, for checking to create and remove files.
but this module seems not to be install.

Can I use this module in Windows?

C:\Users\HUMMING\Dropbox\vvvv13\NodeMail>npm install inotify
npm WARN package.json [email protected] No README.md file found!
npm http GET https://registry.npmjs.org/inotify
npm http 200 https://registry.npmjs.org/inotify
npm http GET https://registry.npmjs.org/inotify/-/inotify-1.2.0.tgz
npm http 200 https://registry.npmjs.org/inotify/-/inotify-1.2.0.tgz

> [email protected] install C:\Users\HUMMING\Dropbox\vvvv13\NodeMail\node_modules\in
otify
> node-gyp rebuild


C:\Users\HUMMING\Dropbox\vvvv13\NodeMail\node_modules\inotify>node "C:\Program F
iles\nodejs\node_modules\npm\bin\node-gyp-bin\\..\..\node_modules\node-gyp\bin\n
ode-gyp.js" rebuild
C:\Users\HUMMING\.node-gyp\0.8.18\deps\uv\include\uv.h(55): fatal error C1083:
포함 파일을 열 수 없습니다. 'stdint.h': No such file or directory [C:\Users\HUMM
ING\Dropbo
x\vvvv13\NodeMail\node_modules\inotify\build\binding.sln]
C:\Users\HUMMING\.node-gyp\0.8.18\deps\uv\include\uv.h(55): fatal error C1083:
포함 파일을 열 수 없습니다. 'stdint.h': No such file or directory [C:\Users\HUMM
ING\Dropbo
x\vvvv13\NodeMail\node_modules\inotify\build\binding.sln]
프로젝트 : warning PRJ0018: 다음 환경 변수를 찾을 수 없습니다. [C:\Users\HUMMING
\Dropbox\vvvv13\N
odeMail\node_modules\inotify\build\binding.sln]
gyp ERR! build error
gyp ERR! stack Error: `c:\Windows\Microsoft.NET\Framework64\v4.0.30319\msbuild.e
xe` failed with exit code: 1
gyp ERR! stack     at ChildProcess.onExit (C:\Program Files\nodejs\node_modules\
npm\node_modules\node-gyp\lib\build.js:255:23)
gyp ERR! stack     at ChildProcess.EventEmitter.emit (events.js:99:17)
gyp ERR! stack     at Process._handle.onexit (child_process.js:678:10)
gyp ERR! System Windows_NT 6.1.7601
gyp ERR! command "node" "C:\\Program Files\\nodejs\\node_modules\\npm\\node_modu
les\\node-gyp\\bin\\node-gyp.js" "rebuild"
gyp ERR! cwd C:\Users\HUMMING\Dropbox\vvvv13\NodeMail\node_modules\inotify
gyp ERR! node -v v0.8.18
gyp ERR! node-gyp -v v0.8.2
gyp ERR! not ok
npm ERR! [email protected] install: `node-gyp rebuild`
npm ERR! `cmd "/c" "node-gyp rebuild"` failed with 1
npm ERR!
npm ERR! Failed at the [email protected] install script.
npm ERR! This is most likely a problem with the inotify package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     node-gyp rebuild
npm ERR! You can get their info via:
npm ERR!     npm owner ls inotify
npm ERR! There is likely additional logging output above.

npm ERR! System Windows_NT 6.1.7601
npm ERR! command "C:\\Program Files\\nodejs\\\\node.exe" "C:\\Program Files\\nod
ejs\\node_modules\\npm\\bin\\npm-cli.js" "install" "inotify"
npm ERR! cwd C:\Users\HUMMING\Dropbox\vvvv13\NodeMail
npm ERR! node -v v0.8.18
npm ERR! npm -v 1.2.2
npm ERR! code ELIFECYCLE
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR!     C:\Users\HUMMING\Dropbox\vvvv13\NodeMail\npm-debug.log
npm ERR! not ok code 0

C:\Users\HUMMING\Dropbox\vvvv13\NodeMail>

Installation Failure

0 info it worked if it ends with ok
1 verbose cli [ 'C:\Program Files\nodejs\node.exe',
1 verbose cli 'C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js',
1 verbose cli 'install',
1 verbose cli 'inotify' ]
2 info using [email protected]
3 info using [email protected]
4 verbose install initial load of C:\dashboardNodejs\package.json
5 verbose installManyTop reading scoped package data from C:\dashboardNodejs\node_modules\express\package.json
6 verbose installManyTop reading scoped package data from C:\dashboardNodejs\node_modules\pg\package.json
7 verbose readDependencies loading dependencies from C:\dashboardNodejs\package.json
8 silly cache add args [ 'inotify', null ]
9 verbose cache add spec inotify
10 silly cache add parsed spec { raw: 'inotify',
10 silly cache add scope: null,
10 silly cache add name: 'inotify',
10 silly cache add rawSpec: '',
10 silly cache add spec: '',
10 silly cache add type: 'range' }
11 silly addNamed inotify@

12 verbose addNamed "" is a valid semver range for inotify
13 silly addNameRange { name: 'inotify', range: '
', hasData: false }
14 silly mapToRegistry name inotify
15 silly mapToRegistry using default registry
16 silly mapToRegistry registry https://registry.npmjs.org/
17 silly mapToRegistry uri https://registry.npmjs.org/inotify
18 verbose addNameRange registry:https://registry.npmjs.org/inotify not in flight; fetching
19 verbose request uri https://registry.npmjs.org/inotify
20 verbose request no auth needed
21 info attempt registry request try #1 at 10:41:10 AM
22 verbose request id 30e7369976ea9ac4
23 verbose etag "4ZY5A5WQTFKRIA2LNLBYWNNEV"
24 http request GET https://registry.npmjs.org/inotify
25 http 304 https://registry.npmjs.org/inotify
26 silly get cb [ 304,
26 silly get { date: 'Tue, 18 Aug 2015 14:41:10 GMT',
26 silly get via: '1.1 varnish',
26 silly get 'cache-control': 'max-age=60',
26 silly get etag: '"4ZY5A5WQTFKRIA2LNLBYWNNEV"',
26 silly get age: '0',
26 silly get connection: 'keep-alive',
26 silly get 'x-served-by': 'cache-iad2140-IAD',
26 silly get 'x-cache': 'MISS',
26 silly get 'x-cache-hits': '0',
26 silly get 'x-timer': 'S1439908870.432567,VS0,VE84',
26 silly get vary: 'Accept' } ]
27 verbose etag https://registry.npmjs.org/inotify from cache
28 verbose get saving inotify to C:\Users\pchawla\AppData\Roaming\npm-cache\registry.npmjs.org\inotify.cache.json
29 silly addNameRange number 2 { name: 'inotify', range: '_', hasData: true }
30 silly addNameRange versions [ 'inotify',
30 silly addNameRange [ '0.1.2',
30 silly addNameRange '0.1.3',
30 silly addNameRange '0.1.4',
30 silly addNameRange '0.1.5',
30 silly addNameRange '0.1.6',
30 silly addNameRange '0.1.7',
30 silly addNameRange '0.1.8',
30 silly addNameRange '0.2.0',
30 silly addNameRange '0.2.1',
30 silly addNameRange '0.2.2',
30 silly addNameRange '1.0.0',
30 silly addNameRange '1.1.0',
30 silly addNameRange '1.2.0',
30 silly addNameRange '1.2.1',
30 silly addNameRange '1.3.0',
30 silly addNameRange '1.4.0' ] ]
31 silly addNamed [email protected]
32 verbose addNamed "1.4.0" is a plain semver version for inotify
33 silly cache afterAdd [email protected]
34 verbose afterAdd C:\Users\pchawla\AppData\Roaming\npm-cache\inotify\1.4.0\package\package.json not in flight; writing
35 verbose afterAdd C:\Users\pchawla\AppData\Roaming\npm-cache\inotify\1.4.0\package\package.json written
36 silly install resolved [ { name: 'inotify',
36 silly install resolved version: '1.4.0',
36 silly install resolved author: { name: 'Camilo Aguilar', email: '[email protected]' },
36 silly install resolved email: '[email protected]',
36 silly install resolved keywords:
36 silly install resolved [ 'inotify',
36 silly install resolved 'watch',
36 silly install resolved 'monitor',
36 silly install resolved 'watch files',
36 silly install resolved 'watch directories' ],
36 silly install resolved license: 'MIT',
36 silly install resolved description: 'inotify bindings for v8 javascript engine',
36 silly install resolved repository:
36 silly install resolved { type: 'git',
36 silly install resolved url: 'git+ssh://[email protected]/c4milo/node-inotify.git' },
36 silly install resolved engines: { node: '>=0.8' },
36 silly install resolved main: 'inotify',
36 silly install resolved dependencies: { nan: '^2.0.5' },
36 silly install resolved scripts:
36 silly install resolved { test: 'node-gyp configure build',
36 silly install resolved install: 'node-gyp rebuild' },
36 silly install resolved gypfile: true,
36 silly install resolved contributors:
36 silly install resolved [ [Object],
36 silly install resolved [Object],
36 silly install resolved [Object],
36 silly install resolved [Object],
36 silly install resolved [Object],
36 silly install resolved [Object],
36 silly install resolved [Object] ],
36 silly install resolved gitHead: '16e8944a62d1aa4315e9cbec377970f056aaab68',
36 silly install resolved bugs: { url: 'https://github.com/c4milo/node-inotify/issues' },
36 silly install resolved homepage: 'https://github.com/c4milo/node-inotify#readme',
36 silly install resolved _id: '[email protected]',
36 silly install resolved _shasum: 'c4a425d2035905a8da03f37426ff717160acdfee',
36 silly install resolved from: 'inotify@',
36 silly install resolved _npmVersion: '2.12.1',
36 silly install resolved _nodeVersion: '0.12.7',
36 silly install resolved _npmUser: { name: 'c4milo', email: '[email protected]' },
36 silly install resolved maintainers: [ [Object], [Object] ],
36 silly install resolved dist:
36 silly install resolved { shasum: 'c4a425d2035905a8da03f37426ff717160acdfee',
36 silly install resolved tarball: 'http://registry.npmjs.org/inotify/-/inotify-1.4.0.tgz' },
36 silly install resolved directories: {},
36 silly install resolved _resolved: 'https://registry.npmjs.org/inotify/-/inotify-1.4.0.tgz',
36 silly install resolved readme: 'ERROR: No README data found!' } ]
37 info install [email protected] into C:\dashboardNodejs
38 info installOne [email protected]
39 verbose installOne of inotify to C:\dashboardNodejs not in flight; installing
40 verbose lock using C:\Users\pchawla\AppData\Roaming\npm-cache_locks\inotify-42d1d58f48eaf03b.lock for C:\dashboardNodejs\node_modules\inotify
41 silly install write writing inotify 1.4.0 to C:\dashboardNodejs\node_modules\inotify
42 verbose unbuild node_modules\inotify
43 silly gentlyRm C:\dashboardNodejs\node_modules\inotify is being purged from base C:\dashboardNodejs
44 verbose gentlyRm don't care about contents; nuking C:\dashboardNodejs\node_modules\inotify
45 verbose tar unpack C:\Users\pchawla\AppData\Roaming\npm-cache\inotify\1.4.0\package.tgz
46 verbose tar unpacking to C:\dashboardNodejs\node_modules\inotify
47 silly gentlyRm C:\dashboardNodejs\node_modules\inotify is being purged
48 verbose gentlyRm don't care about contents; nuking C:\dashboardNodejs\node_modules\inotify
49 silly gunzTarPerm modes [ '777', '666' ]
50 silly gunzTarPerm extractEntry package.json
51 silly gunzTarPerm modified mode [ 'package.json', 420, 438 ]
52 silly gunzTarPerm extractEntry .npmignore
53 silly gunzTarPerm modified mode [ '.npmignore', 420, 438 ]
54 silly gunzTarPerm extractEntry README.md
55 silly gunzTarPerm modified mode [ 'README.md', 420, 438 ]
56 silly gunzTarPerm extractEntry LICENSE
57 silly gunzTarPerm modified mode [ 'LICENSE', 420, 438 ]
58 silly gunzTarPerm extractEntry example.js
59 silly gunzTarPerm modified mode [ 'example.js', 420, 438 ]
60 silly gunzTarPerm extractEntry inotify.js
61 silly gunzTarPerm modified mode [ 'inotify.js', 420, 438 ]
62 silly gunzTarPerm extractEntry binding.gyp
63 silly gunzTarPerm modified mode [ 'binding.gyp', 420, 438 ]
64 silly gunzTarPerm extractEntry src/bindings.cc
65 silly gunzTarPerm modified mode [ 'src/bindings.cc', 420, 438 ]
66 silly gunzTarPerm extractEntry src/bindings.h
67 silly gunzTarPerm modified mode [ 'src/bindings.h', 420, 438 ]
68 silly gunzTarPerm extractEntry src/node_inotify.cc
69 silly gunzTarPerm modified mode [ 'src/node_inotify.cc', 420, 438 ]
70 silly gunzTarPerm extractEntry src/node_inotify.h
71 silly gunzTarPerm modified mode [ 'src/node_inotify.h', 420, 438 ]
72 silly gunzTarPerm extractEntry AUTHORS
73 silly gunzTarPerm modified mode [ 'AUTHORS', 420, 438 ]
74 silly gunzTarPerm extractEntry .travis.yml
75 silly gunzTarPerm modified mode [ '.travis.yml', 420, 438 ]
76 silly gunzTarPerm extractEntry Vagrantfile
77 silly gunzTarPerm modified mode [ 'Vagrantfile', 420, 438 ]
78 verbose write writing to C:\dashboardNodejs\node_modules\inotify\package.json
79 info preinstall [email protected]
80 verbose readDependencies loading dependencies from C:\dashboardNodejs\node_modules\inotify\package.json
81 silly prepareForInstallMany adding nan@^2.0.5 from inotify dependencies
82 verbose readDependencies loading dependencies from C:\dashboardNodejs\node_modules\inotify\package.json
83 silly cache add args [ 'nan@^2.0.5', null ]
84 verbose cache add spec nan@^2.0.5
85 silly cache add parsed spec { raw: 'nan@^2.0.5',
85 silly cache add scope: null,
85 silly cache add name: 'nan',
85 silly cache add rawSpec: '^2.0.5',
85 silly cache add spec: '>=2.0.5 <3.0.0',
85 silly cache add type: 'range' }
86 silly addNamed nan@>=2.0.5 <3.0.0
87 verbose addNamed ">=2.0.5 <3.0.0" is a valid semver range for nan
88 silly addNameRange { name: 'nan', range: '>=2.0.5 <3.0.0', hasData: false }
89 silly mapToRegistry name nan
90 silly mapToRegistry using default registry
91 silly mapToRegistry registry https://registry.npmjs.org/
92 silly mapToRegistry uri https://registry.npmjs.org/nan
93 verbose addNameRange registry:https://registry.npmjs.org/nan not in flight; fetching
94 verbose request uri https://registry.npmjs.org/nan
95 verbose request no auth needed
96 info attempt registry request try #1 at 10:41:10 AM
97 verbose etag "41PIK59ZUA3ADEJCQ281I0TDQ"
98 http request GET https://registry.npmjs.org/nan
99 http 304 https://registry.npmjs.org/nan
100 silly get cb [ 304,
100 silly get { date: 'Tue, 18 Aug 2015 14:41:10 GMT',
100 silly get via: '1.1 varnish',
100 silly get 'cache-control': 'max-age=60',
100 silly get etag: '"41PIK59ZUA3ADEJCQ281I0TDQ"',
100 silly get age: '17',
100 silly get connection: 'keep-alive',
100 silly get 'x-served-by': 'cache-iad2122-IAD',
100 silly get 'x-cache': 'HIT',
100 silly get 'x-cache-hits': '1',
100 silly get 'x-timer': 'S1439908870.722748,VS0,VE1',
100 silly get vary: 'Accept' } ]
101 verbose etag https://registry.npmjs.org/nan from cache
102 verbose get saving nan to C:\Users\pchawla\AppData\Roaming\npm-cache\registry.npmjs.org\nan.cache.json
103 silly addNameRange number 2 { name: 'nan', range: '>=2.0.5 <3.0.0', hasData: true }
104 silly addNameRange versions [ 'nan',
104 silly addNameRange [ '0.3.0-wip',
104 silly addNameRange '0.3.0-wip2',
104 silly addNameRange '0.3.0',
104 silly addNameRange '0.3.1',
104 silly addNameRange '0.3.2',
104 silly addNameRange '0.4.0',
104 silly addNameRange '0.4.1',
104 silly addNameRange '0.4.2',
104 silly addNameRange '0.4.3',
104 silly addNameRange '0.4.4',
104 silly addNameRange '0.5.0',
104 silly addNameRange '0.5.1',
104 silly addNameRange '0.5.2',
104 silly addNameRange '0.6.0',
104 silly addNameRange '0.7.0',
104 silly addNameRange '0.7.1',
104 silly addNameRange '0.8.0',
104 silly addNameRange '1.0.0',
104 silly addNameRange '1.1.0',
104 silly addNameRange '1.1.1',
104 silly addNameRange '1.1.2',
104 silly addNameRange '1.2.0',
104 silly addNameRange '1.3.0',
104 silly addNameRange '1.4.0',
104 silly addNameRange '1.4.1',
104 silly addNameRange '1.5.0',
104 silly addNameRange '1.4.2',
104 silly addNameRange '1.4.3',
104 silly addNameRange '1.5.1',
104 silly addNameRange '1.5.2',
104 silly addNameRange '1.6.0',
104 silly addNameRange '1.5.3',
104 silly addNameRange '1.6.1',
104 silly addNameRange '1.6.2',
104 silly addNameRange '1.7.0',
104 silly addNameRange '1.8.0',
104 silly addNameRange '1.8.1',
104 silly addNameRange '1.8.2',
104 silly addNameRange '1.8.3',
104 silly addNameRange '1.8.4',
104 silly addNameRange '1.9.0',
104 silly addNameRange '2.0.0',
104 silly addNameRange '2.0.1',
104 silly addNameRange '2.0.2',
104 silly addNameRange '2.0.3',
104 silly addNameRange '2.0.4',
104 silly addNameRange '2.0.5' ] ]
105 silly addNamed [email protected]
106 verbose addNamed "2.0.5" is a plain semver version for nan
107 silly cache afterAdd [email protected]
108 verbose afterAdd C:\Users\pchawla\AppData\Roaming\npm-cache\nan\2.0.5\package\package.json not in flight; writing
109 verbose afterAdd C:\Users\pchawla\AppData\Roaming\npm-cache\nan\2.0.5\package\package.json written
110 silly install resolved [ { name: 'nan',
110 silly install resolved version: '2.0.5',
110 silly install resolved description: 'Native Abstractions for Node.js: C++ header for Node 0.8->0.12 compatibility',
110 silly install resolved main: 'include_dirs.js',
110 silly install resolved repository: { type: 'git', url: 'git://github.com/nodejs/nan.git' },
110 silly install resolved scripts:
110 silly install resolved { test: 'tap --gc test/js/*-test.js',
110 silly install resolved 'rebuild-tests': 'pangyp rebuild --msvs_version=2013 --directory test',
110 silly install resolved docs: 'doc/.build.sh' },
110 silly install resolved contributors:
110 silly install resolved [ [Object],
110 silly install resolved [Object],
110 silly install resolved [Object],
110 silly install resolved [Object],
110 silly install resolved [Object],
110 silly install resolved [Object],
110 silly install resolved [Object] ],
110 silly install resolved devDependencies:
110 silly install resolved { bindings: '~1.2.1',
110 silly install resolved 'node-gyp': '~2.0.2',
110 silly install resolved pangyp: '~2.2.0',
110 silly install resolved tap: '~0.7.1',
110 silly install resolved xtend: '~4.0.0' },
110 silly install resolved license: 'MIT',
110 silly install resolved gitHead: 'd13a2e9ce762fd130877b53c71d35963fa2cf689',
110 silly install resolved bugs: { url: 'https://github.com/nodejs/nan/issues' },
110 silly install resolved homepage: 'https://github.com/nodejs/nan#readme',
110 silly install resolved _id: '[email protected]',
110 silly install resolved _shasum: '365888014be1fd178db0cbfa258edf7b0cb1c408',
110 silly install resolved _from: 'nan@>=2.0.5 <3.0.0',
110 silly install resolved _npmVersion: '2.13.3',
110 silly install resolved _nodeVersion: '3.0.0',
110 silly install resolved _npmUser: { name: 'kkoopa', email: '[email protected]' },
110 silly install resolved maintainers: [ [Object], [Object] ],
110 silly install resolved dist:
110 silly install resolved { shasum: '365888014be1fd178db0cbfa258edf7b0cb1c408',
110 silly install resolved tarball: 'http://registry.npmjs.org/nan/-/nan-2.0.5.tgz' },
110 silly install resolved directories: {},
110 silly install resolved _resolved: 'https://registry.npmjs.org/nan/-/nan-2.0.5.tgz',
110 silly install resolved readme: 'ERROR: No README data found!' } ]
111 info install [email protected] into C:\dashboardNodejs\node_modules\inotify
112 info installOne [email protected]
113 verbose installOne of nan to C:\dashboardNodejs\node_modules\inotify not in flight; installing
114 verbose lock using C:\Users\pchawla\AppData\Roaming\npm-cache_locks\nan-a5b622939f760440.lock for C:\dashboardNodejs\node_modules\inotify\node_modules\nan
115 silly install write writing nan 2.0.5 to C:\dashboardNodejs\node_modules\inotify\node_modules\nan
116 verbose unbuild node_modules\inotify\node_modules\nan
117 silly gentlyRm C:\dashboardNodejs\node_modules\inotify\node_modules\nan is being purged from base C:\dashboardNodejs
118 verbose gentlyRm don't care about contents; nuking C:\dashboardNodejs\node_modules\inotify\node_modules\nan
119 verbose tar unpack C:\Users\pchawla\AppData\Roaming\npm-cache\nan\2.0.5\package.tgz
120 verbose tar unpacking to C:\dashboardNodejs\node_modules\inotify\node_modules\nan
121 silly gentlyRm C:\dashboardNodejs\node_modules\inotify\node_modules\nan is being purged
122 verbose gentlyRm don't care about contents; nuking C:\dashboardNodejs\node_modules\inotify\node_modules\nan
123 silly gunzTarPerm modes [ '777', '666' ]
124 silly gunzTarPerm extractEntry package.json
125 silly gunzTarPerm modified mode [ 'package.json', 436, 438 ]
126 silly gunzTarPerm extractEntry README.md
127 silly gunzTarPerm modified mode [ 'README.md', 436, 438 ]
128 silly gunzTarPerm extractEntry include_dirs.js
129 silly gunzTarPerm modified mode [ 'include_dirs.js', 436, 438 ]
130 silly gunzTarPerm extractEntry nan_converters.h
131 silly gunzTarPerm modified mode [ 'nan_converters.h', 436, 438 ]
132 silly gunzTarPerm extractEntry LICENSE.md
133 silly gunzTarPerm modified mode [ 'LICENSE.md', 436, 438 ]
134 silly gunzTarPerm extractEntry .dntrc
135 silly gunzTarPerm modified mode [ '.dntrc', 436, 438 ]
136 silly gunzTarPerm extractEntry appveyor.yml
137 silly gunzTarPerm modified mode [ 'appveyor.yml', 436, 438 ]
138 silly gunzTarPerm extractEntry doc/new.md
139 silly gunzTarPerm modified mode [ 'doc/new.md', 436, 438 ]
140 silly gunzTarPerm extractEntry doc/.build.sh
141 silly gunzTarPerm modified mode [ 'doc/.build.sh', 509, 511 ]
142 silly gunzTarPerm extractEntry doc/buffers.md
143 silly gunzTarPerm modified mode [ 'doc/buffers.md', 436, 438 ]
144 silly gunzTarPerm extractEntry doc/callback.md
145 silly gunzTarPerm modified mode [ 'doc/callback.md', 436, 438 ]
146 silly gunzTarPerm extractEntry doc/converters.md
147 silly gunzTarPerm modified mode [ 'doc/converters.md', 436, 438 ]
148 silly gunzTarPerm extractEntry doc/errors.md
149 silly gunzTarPerm modified mode [ 'doc/errors.md', 436, 438 ]
150 silly gunzTarPerm extractEntry doc/maybe_types.md
151 silly gunzTarPerm modified mode [ 'doc/maybe_types.md', 436, 438 ]
152 silly gunzTarPerm extractEntry doc/methods.md
153 silly gunzTarPerm modified mode [ 'doc/methods.md', 436, 438 ]
154 silly gunzTarPerm extractEntry doc/asyncworker.md
155 silly gunzTarPerm modified mode [ 'doc/asyncworker.md', 436, 438 ]
156 silly gunzTarPerm extractEntry doc/node_misc.md
157 silly gunzTarPerm modified mode [ 'doc/node_misc.md', 436, 438 ]
158 silly gunzTarPerm extractEntry doc/persistent.md
159 silly gunzTarPerm modified mode [ 'doc/persistent.md', 436, 438 ]
160 silly gunzTarPerm extractEntry doc/scopes.md
161 silly gunzTarPerm modified mode [ 'doc/scopes.md', 436, 438 ]
162 silly gunzTarPerm extractEntry doc/script.md
163 silly gunzTarPerm modified mode [ 'doc/script.md', 436, 438 ]
164 silly gunzTarPerm extractEntry doc/string_bytes.md
165 silly gunzTarPerm modified mode [ 'doc/string_bytes.md', 436, 438 ]
166 silly gunzTarPerm extractEntry doc/v8_internals.md
167 silly gunzTarPerm modified mode [ 'doc/v8_internals.md', 436, 438 ]
168 silly gunzTarPerm extractEntry doc/v8_misc.md
169 silly gunzTarPerm modified mode [ 'doc/v8_misc.md', 436, 438 ]
170 silly gunzTarPerm extractEntry nan.h
171 silly gunzTarPerm modified mode [ 'nan.h', 436, 438 ]
172 silly gunzTarPerm extractEntry nan_callbacks.h
173 silly gunzTarPerm modified mode [ 'nan_callbacks.h', 436, 438 ]
174 silly gunzTarPerm extractEntry nan_callbacks_12_inl.h
175 silly gunzTarPerm modified mode [ 'nan_callbacks_12_inl.h', 436, 438 ]
176 silly gunzTarPerm extractEntry nan_callbacks_pre_12_inl.h
177 silly gunzTarPerm modified mode [ 'nan_callbacks_pre_12_inl.h', 436, 438 ]
178 silly gunzTarPerm extractEntry nan_converters_43_inl.h
179 silly gunzTarPerm modified mode [ 'nan_converters_43_inl.h', 436, 438 ]
180 silly gunzTarPerm extractEntry nan_converters_pre_43_inl.h
181 silly gunzTarPerm modified mode [ 'nan_converters_pre_43_inl.h', 436, 438 ]
182 silly gunzTarPerm extractEntry nan_implementation_12_inl.h
183 silly gunzTarPerm modified mode [ 'nan_implementation_12_inl.h', 436, 438 ]
184 silly gunzTarPerm extractEntry nan_implementation_pre_12_inl.h
185 silly gunzTarPerm modified mode [ 'nan_implementation_pre_12_inl.h', 436, 438 ]
186 silly gunzTarPerm extractEntry nan_maybe_43_inl.h
187 silly gunzTarPerm modified mode [ 'nan_maybe_43_inl.h', 436, 438 ]
188 silly gunzTarPerm extractEntry nan_maybe_pre_43_inl.h
189 silly gunzTarPerm modified mode [ 'nan_maybe_pre_43_inl.h', 436, 438 ]
190 silly gunzTarPerm extractEntry nan_new.h
191 silly gunzTarPerm modified mode [ 'nan_new.h', 436, 438 ]
192 silly gunzTarPerm extractEntry nan_object_wrap.h
193 silly gunzTarPerm modified mode [ 'nan_object_wrap.h', 436, 438 ]
194 silly gunzTarPerm extractEntry nan_persistent_12_inl.h
195 silly gunzTarPerm modified mode [ 'nan_persistent_12_inl.h', 436, 438 ]
196 silly gunzTarPerm extractEntry nan_persistent_pre_12_inl.h
197 silly gunzTarPerm modified mode [ 'nan_persistent_pre_12_inl.h', 436, 438 ]
198 silly gunzTarPerm extractEntry nan_string_bytes.h
199 silly gunzTarPerm modified mode [ 'nan_string_bytes.h', 436, 438 ]
200 silly gunzTarPerm extractEntry nan_weak.h
201 silly gunzTarPerm modified mode [ 'nan_weak.h', 436, 438 ]
202 silly gunzTarPerm extractEntry CHANGELOG.md
203 silly gunzTarPerm modified mode [ 'CHANGELOG.md', 436, 438 ]
204 silly gunzTarPerm extractEntry tools/package.json
205 silly gunzTarPerm modified mode [ 'tools/package.json', 436, 438 ]
206 silly gunzTarPerm extractEntry tools/README.md
207 silly gunzTarPerm modified mode [ 'tools/README.md', 436, 438 ]
208 silly gunzTarPerm extractEntry tools/1to2.js
209 silly gunzTarPerm modified mode [ 'tools/1to2.js', 509, 511 ]
210 verbose write writing to C:\dashboardNodejs\node_modules\inotify\node_modules\nan\package.json
211 info preinstall [email protected]
212 verbose readDependencies loading dependencies from C:\dashboardNodejs\node_modules\inotify\node_modules\nan\package.json
213 verbose readDependencies loading dependencies from C:\dashboardNodejs\node_modules\inotify\node_modules\nan\package.json
214 silly install resolved []
215 verbose about to build C:\dashboardNodejs\node_modules\inotify\node_modules\nan
216 info build C:\dashboardNodejs\node_modules\inotify\node_modules\nan
217 info linkStuff [email protected]
218 silly linkStuff [email protected] has C:\dashboardNodejs\node_modules\inotify\node_modules as its parent node_modules
219 verbose linkBins [email protected]
220 verbose linkMans [email protected]
221 verbose rebuildBundles [email protected]
222 info install [email protected]
223 info postinstall [email protected]
224 verbose unlock done using C:\Users\pchawla\AppData\Roaming\npm-cache_locks\nan-a5b622939f760440.lock for C:\dashboardNodejs\node_modules\inotify\node_modules\nan
225 verbose about to build C:\dashboardNodejs\node_modules\inotify
226 info build C:\dashboardNodejs\node_modules\inotify
227 info linkStuff [email protected]
228 silly linkStuff [email protected] has C:\dashboardNodejs\node_modules as its parent node_modules
229 verbose linkBins [email protected]
230 verbose linkMans [email protected]
231 verbose rebuildBundles [email protected]
232 verbose rebuildBundles [ 'nan' ]
233 info install [email protected]
234 verbose unsafe-perm in lifecycle true
235 info [email protected] Failed to exec install script
236 verbose unlock done using C:\Users\pchawla\AppData\Roaming\npm-cache_locks\inotify-42d1d58f48eaf03b.lock for C:\dashboardNodejs\node_modules\inotify
237 verbose stack Error: [email protected] install: node-gyp rebuild
237 verbose stack Exit status 1
237 verbose stack at EventEmitter. (C:\Program Files\nodejs\node_modules\npm\lib\utils\lifecycle.js:213:16)
237 verbose stack at EventEmitter.emit (events.js:110:17)
237 verbose stack at ChildProcess. (C:\Program Files\nodejs\node_modules\npm\lib\utils\spawn.js:24:14)
237 verbose stack at ChildProcess.emit (events.js:110:17)
237 verbose stack at maybeClose (child_process.js:1015:16)
237 verbose stack at Process.ChildProcess._handle.onexit (child_process.js:1087:5)
238 verbose pkgid [email protected]
239 verbose cwd C:\dashboardNodejs
240 error Windows_NT 6.1.7601
241 error argv "C:\Program Files\nodejs\node.exe" "C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js" "install" "inotify"
242 error node v0.12.7
243 error npm v2.11.3
244 error code ELIFECYCLE
245 error [email protected] install: node-gyp rebuild
245 error Exit status 1
246 error Failed at the [email protected] install script 'node-gyp rebuild'.
246 error This is most likely a problem with the inotify package,
246 error not with npm itself.
246 error Tell the author that this fails on your system:
246 error node-gyp rebuild
246 error You can get their info via:
246 error npm owner ls inotify
246 error There is likely additional logging output above.
247 verbose exit [ 1, true ]
248 verbose unbuild node_modules\inotify
249 info preuninstall [email protected]
250 info uninstall [email protected]
251 verbose unbuild rmStuff [email protected] from C:\dashboardNodejs\node_modules
252 info postuninstall [email protected]
253 silly gentlyRm C:\dashboardNodejs\node_modules\inotify is being purged from base C:\dashboardNodejs
254 verbose gentlyRm don't care about contents; nuking C:\dashboardNodejs\node_modules\inotify
255 silly vacuum-fs purging C:\dashboardNodejs\node_modules\inotify
256 silly vacuum-fs quitting because other entries in C:\dashboardNodejs\node_modules

Install Issue using Node 0.12.2 & Node-Gyp 1.0.3

There is an issue installing node-inotify after having upgraded it's dependencies. Here is the error log:

aaa@ubuntu:~/node_modules/node-inotify$ node-gyp clean
gyp info it worked if it ends with ok
gyp info using [email protected]
gyp info using [email protected] | linux | x64
gyp info ok

aaa@ubuntu:~/node_modules/node-inotify$ node-gyp configure
gyp info it worked if it ends with ok
gyp info using [email protected]
gyp info using [email protected] | linux | x64
gyp info spawn python
gyp info spawn args [ '/usr/local/lib/node_modules/node-gyp/gyp/gyp_main.py',
gyp info spawn args 'binding.gyp',
gyp info spawn args '-f',
gyp info spawn args 'make',
gyp info spawn args '-I',
gyp info spawn args '/home/aaa/node_modules/inotify/build/config.gypi',
gyp info spawn args '-I',
gyp info spawn args '/usr/local/lib/node_modules/node-gyp/addon.gypi',
gyp info spawn args '-I',
gyp info spawn args '/home/aaa/.node-gyp/0.12.2/common.gypi',
gyp info spawn args '-Dlibrary=shared_library',
gyp info spawn args '-Dvisibility=default',
gyp info spawn args '-Dnode_root_dir=/home/aaa/.node-gyp/0.12.2',
gyp info spawn args '-Dmodule_root_dir=/home/aaa/node_modules/inotify',
gyp info spawn args '--depth=.',
gyp info spawn args '--no-parallel',
gyp info spawn args '--generator-output',
gyp info spawn args 'build',
gyp info spawn args '-Goutput_dir=.' ]
gyp info ok

aaa@ubuntu:~/node_modules/inotify$ node-gyp build
gyp info it worked if it ends with ok
gyp info using [email protected]
gyp info using [email protected] | linux | x64
gyp info spawn make
gyp info spawn args [ 'BUILDTYPE=Release', '-C', 'build' ]
make: Entering directory /home/aaa/node_modules/inotify/build' CXX(target) Release/obj.target/inotify/src/bindings.o In file included from ../src/bindings.cc:2:0: ../src/bindings.h:16:44: error: ‘Arguments’ does not name a type static Handle<Value> New(const Arguments& args); ^ ../src/bindings.h:16:55: error: ISO C++ forbids declaration of ‘args’ with no type [-fpermissive] static Handle<Value> New(const Arguments& args); ^ ../src/bindings.h:17:49: error: ‘Arguments’ does not name a type static Handle<Value> AddWatch(const Arguments& args); ^ ../src/bindings.h:17:60: error: ISO C++ forbids declaration of ‘args’ with no type [-fpermissive] static Handle<Value> AddWatch(const Arguments& args); ^ ../src/bindings.h:18:52: error: ‘Arguments’ does not name a type static Handle<Value> RemoveWatch(const Arguments& args); ^ ../src/bindings.h:18:63: error: ISO C++ forbids declaration of ‘args’ with no type [-fpermissive] static Handle<Value> RemoveWatch(const Arguments& args); ^ ../src/bindings.h:19:46: error: ‘Arguments’ does not name a type static Handle<Value> Close(const Arguments& args); ^ ../src/bindings.h:19:57: error: ISO C++ forbids declaration of ‘args’ with no type [-fpermissive] static Handle<Value> Close(const Arguments& args); ^ ../src/bindings.h:21:52: error: ‘AccessorInfo’ does not name a type const AccessorInfo& info); ^ ../src/bindings.h:21:66: error: ISO C++ forbids declaration of ‘info’ with no type [-fpermissive] const AccessorInfo& info); ^ ../src/bindings.h:24:13: error: ‘uv_poll_t’ does not name a type uv_poll_t* read_watcher; ^ ../src/bindings.h:28:34: error: ‘uv_poll_t’ has not been declared static void Callback(uv_poll_t* watcher, int status, int revents); ^ ../src/bindings.h:29:41: error: ‘uv_handle_t’ has not been declared static void on_handle_close(uv_handle_t* handle); ^ ../src/bindings.cc: In static member function ‘static void NodeInotify::Inotify::Initialize(v8::Handle<v8::Object>)’: ../src/bindings.cc:21:71: error: no matching function for call to ‘v8::FunctionTemplate::New(v8::Handle<v8::Value> (&)(const int&))’ Local<FunctionTemplate> t = FunctionTemplate::New(Inotify::New); ^ ../src/bindings.cc:21:71: note: candidate is: In file included from /home/aaa/.node-gyp/0.12.2/src/node.h:61:0, from ../src/node_inotify.h:5, from ../src/bindings.h:4, from ../src/bindings.cc:2: /home/aaa/.node-gyp/0.12.2/deps/v8/include/v8.h:3455:34: note: static v8::Local<v8::FunctionTemplate> v8::FunctionTemplate::New(v8::Isolate*, v8::FunctionCallback, v8::Handle<v8::Value>, v8::Handle<v8::Signature>, int) static Local<FunctionTemplate> New( ^ /home/aaa/.node-gyp/0.12.2/deps/v8/include/v8.h:3455:34: note: no known conversion for argument 1 from ‘v8::Handle<v8::Value>(const int&)’ to ‘v8::Isolate*’ ../src/bindings.cc:26:56: error: invalid conversion from ‘v8::Handle<v8::Value> (*)(const int&)’ to ‘v8::FunctionCallback {aka void (*)(const v8::FunctionCallbackInfo<v8::Value>&)}’ [-fpermissive] Inotify::AddWatch); ^ In file included from ../src/node_inotify.h:5:0, from ../src/bindings.h:4, from ../src/bindings.cc:2: /home/aaa/.node-gyp/0.12.2/src/node.h:244:13: error: initializing argument 3 of ‘void node::NODE_SET_PROTOTYPE_METHOD(v8::Handle<v8::FunctionTemplate>, const char*, v8::FunctionCallback)’ [-fpermissive] inline void NODE_SET_PROTOTYPE_METHOD(v8::Handle<v8::FunctionTemplate> recv, ^ ../src/bindings.cc:28:59: error: invalid conversion from ‘v8::Handle<v8::Value> (*)(const int&)’ to ‘v8::FunctionCallback {aka void (*)(const v8::FunctionCallbackInfo<v8::Value>&)}’ [-fpermissive] Inotify::RemoveWatch); ^ In file included from ../src/node_inotify.h:5:0, from ../src/bindings.h:4, from ../src/bindings.cc:2: /home/aaa/.node-gyp/0.12.2/src/node.h:244:13: error: initializing argument 3 of ‘void node::NODE_SET_PROTOTYPE_METHOD(v8::Handle<v8::FunctionTemplate>, const char*, v8::FunctionCallback)’ [-fpermissive] inline void NODE_SET_PROTOTYPE_METHOD(v8::Handle<v8::FunctionTemplate> recv, ^ ../src/bindings.cc:30:53: error: invalid conversion from ‘v8::Handle<v8::Value> (*)(const int&)’ to ‘v8::FunctionCallback {aka void (*)(const v8::FunctionCallbackInfo<v8::Value>&)}’ [-fpermissive] Inotify::Close); ^ In file included from ../src/node_inotify.h:5:0, from ../src/bindings.h:4, from ../src/bindings.cc:2: /home/aaa/.node-gyp/0.12.2/src/node.h:244:13: error: initializing argument 3 of ‘void node::NODE_SET_PROTOTYPE_METHOD(v8::Handle<v8::FunctionTemplate>, const char*, v8::FunctionCallback)’ [-fpermissive] inline void NODE_SET_PROTOTYPE_METHOD(v8::Handle<v8::FunctionTemplate> recv, ^ /home/aaa/.node-gyp/0.12.2/src/node.h:222:15: error: ‘class v8::FunctionTemplate’ has no member named ‘ForceSet’ (target)->ForceSet(constant_name, constant_value, constant_attributes); \ ^ ../src/bindings.cc:33:9: note: in expansion of macro ‘NODE_DEFINE_CONSTANT’ NODE_DEFINE_CONSTANT(t, IN_ACCESS); //File was accessed (read) ^ /home/aaa/.node-gyp/0.12.2/src/node.h:222:15: error: ‘class v8::FunctionTemplate’ has no member named ‘ForceSet’ (target)->ForceSet(constant_name, constant_value, constant_attributes); \ ^ ../src/bindings.cc:34:9: note: in expansion of macro ‘NODE_DEFINE_CONSTANT’ NODE_DEFINE_CONSTANT(t, IN_ATTRIB); //Metadata changed, e.g., permissions, timestamps, ^ /home/aaa/.node-gyp/0.12.2/src/node.h:222:15: error: ‘class v8::FunctionTemplate’ has no member named ‘ForceSet’ (target)->ForceSet(constant_name, constant_value, constant_attributes); \ ^ ../src/bindings.cc:37:9: note: in expansion of macro ‘NODE_DEFINE_CONSTANT’ NODE_DEFINE_CONSTANT(t, IN_CLOSE_WRITE); //File opened for writing was closed ^ /home/aaa/.node-gyp/0.12.2/src/node.h:222:15: error: ‘class v8::FunctionTemplate’ has no member named ‘ForceSet’ (target)->ForceSet(constant_name, constant_value, constant_attributes); \ ^ ../src/bindings.cc:38:9: note: in expansion of macro ‘NODE_DEFINE_CONSTANT’ NODE_DEFINE_CONSTANT(t, IN_CLOSE_NOWRITE); //File not opened for writing was closed ^ /home/aaa/.node-gyp/0.12.2/src/node.h:222:15: error: ‘class v8::FunctionTemplate’ has no member named ‘ForceSet’ (target)->ForceSet(constant_name, constant_value, constant_attributes); \ ^ ../src/bindings.cc:39:9: note: in expansion of macro ‘NODE_DEFINE_CONSTANT’ NODE_DEFINE_CONSTANT(t, IN_CREATE); //File/directory created in watched directory ^ /home/aaa/.node-gyp/0.12.2/src/node.h:222:15: error: ‘class v8::FunctionTemplate’ has no member named ‘ForceSet’ (target)->ForceSet(constant_name, constant_value, constant_attributes); \ ^ ../src/bindings.cc:40:9: note: in expansion of macro ‘NODE_DEFINE_CONSTANT’ NODE_DEFINE_CONSTANT(t, IN_DELETE); //File/directory deleted from watched directory ^ /home/aaa/.node-gyp/0.12.2/src/node.h:222:15: error: ‘class v8::FunctionTemplate’ has no member named ‘ForceSet’ (target)->ForceSet(constant_name, constant_value, constant_attributes); \ ^ ../src/bindings.cc:41:9: note: in expansion of macro ‘NODE_DEFINE_CONSTANT’ NODE_DEFINE_CONSTANT(t, IN_DELETE_SELF); //Watched file/directory was itself deleted ^ /home/aaa/.node-gyp/0.12.2/src/node.h:222:15: error: ‘class v8::FunctionTemplate’ has no member named ‘ForceSet’ (target)->ForceSet(constant_name, constant_value, constant_attributes); \ ^ ../src/bindings.cc:42:9: note: in expansion of macro ‘NODE_DEFINE_CONSTANT’ NODE_DEFINE_CONSTANT(t, IN_MODIFY); //File was modified ^ /home/aaa/.node-gyp/0.12.2/src/node.h:222:15: error: ‘class v8::FunctionTemplate’ has no member named ‘ForceSet’ (target)->ForceSet(constant_name, constant_value, constant_attributes); \ ^ ../src/bindings.cc:43:9: note: in expansion of macro ‘NODE_DEFINE_CONSTANT’ NODE_DEFINE_CONSTANT(t, IN_MOVE_SELF); //Watched file/directory was itself moved ^ /home/aaa/.node-gyp/0.12.2/src/node.h:222:15: error: ‘class v8::FunctionTemplate’ has no member named ‘ForceSet’ (target)->ForceSet(constant_name, constant_value, constant_attributes); \ ^ ../src/bindings.cc:44:9: note: in expansion of macro ‘NODE_DEFINE_CONSTANT’ NODE_DEFINE_CONSTANT(t, IN_MOVED_FROM); //File moved out of watched directory ^ /home/aaa/.node-gyp/0.12.2/src/node.h:222:15: error: ‘class v8::FunctionTemplate’ has no member named ‘ForceSet’ (target)->ForceSet(constant_name, constant_value, constant_attributes); \ ^ ../src/bindings.cc:45:9: note: in expansion of macro ‘NODE_DEFINE_CONSTANT’ NODE_DEFINE_CONSTANT(t, IN_MOVED_TO); //File moved into watched directory ^ /home/aaa/.node-gyp/0.12.2/src/node.h:222:15: error: ‘class v8::FunctionTemplate’ has no member named ‘ForceSet’ (target)->ForceSet(constant_name, constant_value, constant_attributes); \ ^ ../src/bindings.cc:46:9: note: in expansion of macro ‘NODE_DEFINE_CONSTANT’ NODE_DEFINE_CONSTANT(t, IN_OPEN); //File was opened ^ /home/aaa/.node-gyp/0.12.2/src/node.h:222:15: error: ‘class v8::FunctionTemplate’ has no member named ‘ForceSet’ (target)->ForceSet(constant_name, constant_value, constant_attributes); \ ^ ../src/bindings.cc:47:9: note: in expansion of macro ‘NODE_DEFINE_CONSTANT’ NODE_DEFINE_CONSTANT(t, IN_IGNORED); // Watch was removed explicitly (inotify.watch.rm) or ^ /home/aaa/.node-gyp/0.12.2/src/node.h:222:15: error: ‘class v8::FunctionTemplate’ has no member named ‘ForceSet’ (target)->ForceSet(constant_name, constant_value, constant_attributes); \ ^ ../src/bindings.cc:50:9: note: in expansion of macro ‘NODE_DEFINE_CONSTANT’ NODE_DEFINE_CONSTANT(t, IN_ISDIR); //Subject of this event is a directory ^ /home/aaa/.node-gyp/0.12.2/src/node.h:222:15: error: ‘class v8::FunctionTemplate’ has no member named ‘ForceSet’ (target)->ForceSet(constant_name, constant_value, constant_attributes); \ ^ ../src/bindings.cc:51:9: note: in expansion of macro ‘NODE_DEFINE_CONSTANT’ NODE_DEFINE_CONSTANT(t, IN_Q_OVERFLOW); //Event queue overflowed (wd is -1 for this event) ^ /home/aaa/.node-gyp/0.12.2/src/node.h:222:15: error: ‘class v8::FunctionTemplate’ has no member named ‘ForceSet’ (target)->ForceSet(constant_name, constant_value, constant_attributes); \ ^ ../src/bindings.cc:52:9: note: in expansion of macro ‘NODE_DEFINE_CONSTANT’ NODE_DEFINE_CONSTANT(t, IN_UNMOUNT); //File system containing watched object was unmounted ^ /home/aaa/.node-gyp/0.12.2/src/node.h:222:15: error: ‘class v8::FunctionTemplate’ has no member named ‘ForceSet’ (target)->ForceSet(constant_name, constant_value, constant_attributes); \ ^ ../src/bindings.cc:53:9: note: in expansion of macro ‘NODE_DEFINE_CONSTANT’ NODE_DEFINE_CONSTANT(t, IN_ALL_EVENTS); ^ /home/aaa/.node-gyp/0.12.2/src/node.h:222:15: error: ‘class v8::FunctionTemplate’ has no member named ‘ForceSet’ (target)->ForceSet(constant_name, constant_value, constant_attributes); \ ^ ../src/bindings.cc:55:9: note: in expansion of macro ‘NODE_DEFINE_CONSTANT’ NODE_DEFINE_CONSTANT(t, IN_ONLYDIR); // Only watch the path if it is a directory. ^ /home/aaa/.node-gyp/0.12.2/src/node.h:222:15: error: ‘class v8::FunctionTemplate’ has no member named ‘ForceSet’ (target)->ForceSet(constant_name, constant_value, constant_attributes); \ ^ ../src/bindings.cc:56:9: note: in expansion of macro ‘NODE_DEFINE_CONSTANT’ NODE_DEFINE_CONSTANT(t, IN_DONT_FOLLOW); // Do not follow a sym link ^ /home/aaa/.node-gyp/0.12.2/src/node.h:222:15: error: ‘class v8::FunctionTemplate’ has no member named ‘ForceSet’ (target)->ForceSet(constant_name, constant_value, constant_attributes); \ ^ ../src/bindings.cc:57:9: note: in expansion of macro ‘NODE_DEFINE_CONSTANT’ NODE_DEFINE_CONSTANT(t, IN_ONESHOT); // Only send event once ^ /home/aaa/.node-gyp/0.12.2/src/node.h:222:15: error: ‘class v8::FunctionTemplate’ has no member named ‘ForceSet’ (target)->ForceSet(constant_name, constant_value, constant_attributes); \ ^ ../src/bindings.cc:58:9: note: in expansion of macro ‘NODE_DEFINE_CONSTANT’ NODE_DEFINE_CONSTANT(t, IN_MASK_ADD); //Add (OR) events to watch mask for this pathname if it ^ /home/aaa/.node-gyp/0.12.2/src/node.h:222:15: error: ‘class v8::FunctionTemplate’ has no member named ‘ForceSet’ (target)->ForceSet(constant_name, constant_value, constant_attributes); \ ^ ../src/bindings.cc:61:9: note: in expansion of macro ‘NODE_DEFINE_CONSTANT’ NODE_DEFINE_CONSTANT(t, IN_CLOSE); // (IN_CLOSE_WRITE | IN_CLOSE_NOWRITE) Close ^ /home/aaa/.node-gyp/0.12.2/src/node.h:222:15: error: ‘class v8::FunctionTemplate’ has no member named ‘ForceSet’ (target)->ForceSet(constant_name, constant_value, constant_attributes); \ ^ ../src/bindings.cc:62:9: note: in expansion of macro ‘NODE_DEFINE_CONSTANT’ NODE_DEFINE_CONSTANT(t, IN_MOVE); // (IN_MOVED_FROM | IN_MOVED_TO) Moves ^ ../src/bindings.cc:64:46: error: ‘NODE_PSYMBOL’ was not declared in this scope path_sym = NODE_PSYMBOL("path"); ^ ../src/bindings.cc:75:72: error: no matching function for call to ‘v8::ObjectTemplate::SetAccessor(v8::Persistent<v8::String>&, v8::Handle<v8::Value> (&)(v8::Local<v8::String>, const int&))’ object_tmpl->SetAccessor(persistent_sym, Inotify::GetPersistent); ^ ../src/bindings.cc:75:72: note: candidate is: In file included from /home/aaa/.node-gyp/0.12.2/src/node.h:61:0, from ../src/node_inotify.h:5, from ../src/bindings.h:4, from ../src/bindings.cc:2: /home/aaa/.node-gyp/0.12.2/deps/v8/include/v8.h:3579:8: note: void v8::ObjectTemplate::SetAccessor(v8::Handle<v8::String>, v8::AccessorGetterCallback, v8::AccessorSetterCallback, v8::Handle<v8::Value>, v8::AccessControl, v8::PropertyAttribute, v8::Handle<v8::AccessorSignature>) void SetAccessor(Handle<String> name, ^ /home/aaa/.node-gyp/0.12.2/deps/v8/include/v8.h:3579:8: note: no known conversion for argument 1 from ‘v8::Persistent<v8::String>’ to ‘v8::Handle<v8::String>’ ../src/bindings.cc:77:25: error: ‘NewSymbol’ is not a member of ‘v8::String’ t->SetClassName(String::NewSymbol("Inotify")); ^ ../src/bindings.cc:78:21: error: ‘NewSymbol’ is not a member of ‘v8::String’ target->Set(String::NewSymbol("Inotify"), t->GetFunction()); ^ ../src/bindings.cc: In constructor ‘NodeInotify::Inotify::Inotify()’: ../src/bindings.cc:83:9: error: ‘read_watcher’ was not declared in this scope read_watcher = new uv_poll_t; ^ ../src/bindings.cc:83:28: error: expected type-specifier before ‘uv_poll_t’ read_watcher = new uv_poll_t; ^ ../src/bindings.cc:83:28: error: expected ‘;’ before ‘uv_poll_t’ ../src/bindings.cc: In constructor ‘NodeInotify::Inotify::Inotify(bool)’: ../src/bindings.cc:91:9: error: ‘read_watcher’ was not declared in this scope read_watcher = new uv_poll_t; ^ ../src/bindings.cc:91:28: error: expected type-specifier before ‘uv_poll_t’ read_watcher = new uv_poll_t; ^ ../src/bindings.cc:91:28: error: expected ‘;’ before ‘uv_poll_t’ ../src/bindings.cc: In destructor ‘virtual NodeInotify::Inotify::~Inotify()’: ../src/bindings.cc:101:21: error: ‘uv_handle_t’ was not declared in this scope uv_ref((uv_handle_t *) read_watcher); ^ ../src/bindings.cc:101:34: error: expected primary-expression before ‘)’ token uv_ref((uv_handle_t *) read_watcher); ^ ../src/bindings.cc:101:48: error: ‘uv_ref’ was not declared in this scope uv_ref((uv_handle_t *) read_watcher); ^ ../src/bindings.cc: At global scope: ../src/bindings.cc:112:38: error: ‘Arguments’ does not name a type Handle<Value> Inotify::New(const Arguments& args) { ^ ../src/bindings.cc:112:49: error: ISO C++ forbids declaration of ‘args’ with no type [-fpermissive] Handle<Value> Inotify::New(const Arguments& args) { ^ In file included from /home/aaa/.node-gyp/0.12.2/src/node.h:61:0, from ../src/node_inotify.h:5, from ../src/bindings.h:4, from ../src/bindings.cc:2: /home/aaa/.node-gyp/0.12.2/deps/v8/include/v8.h: In static member function ‘static v8::Handle<v8::Value> NodeInotify::Inotify::New(const int&)’: /home/aaa/.node-gyp/0.12.2/deps/v8/include/v8.h:816:13: error: ‘v8::HandleScope::HandleScope()’ is protected V8_INLINE HandleScope() {} ^ ../src/bindings.cc:113:21: error: within this context HandleScope scope; ^ ../src/bindings.cc:116:17: error: request for member ‘Length’ in ‘args’, which is of non-class type ‘const int’ if(args.Length() == 1 && args[0]->IsBoolean()) { ^ ../src/bindings.cc:116:40: error: invalid types ‘const int[int]’ for array subscript if(args.Length() == 1 && args[0]->IsBoolean()) { ^ ../src/bindings.cc:117:41: error: invalid types ‘const int[int]’ for array subscript inotify = new Inotify(args[0]->IsTrue()); ^ ../src/bindings.cc:125:28: error: ‘New’ is not a member of ‘v8::String’ ThrowException(String::New(strerror(errno))); ^ ../src/bindings.cc:125:56: error: ‘ThrowException’ was not declared in this scope ThrowException(String::New(strerror(errno))); ^ ../src/bindings.cc:126:25: error: too few arguments to function ‘v8::Handle<v8::Primitive> v8::Null(v8::Isolate*)’ return Null(); ^ In file included from /home/aaa/.node-gyp/0.12.2/src/node.h:61:0, from ../src/node_inotify.h:5, from ../src/bindings.h:4, from ../src/bindings.cc:2: /home/aaa/.node-gyp/0.12.2/deps/v8/include/v8.h:306:28: note: declared here friend Handle<Primitive> Null(Isolate* isolate); ^ ../src/bindings.cc:138:38: error: ‘uv_default_loop’ was not declared in this scope uv_poll_init(uv_default_loop(), inotify->read_watcher, inotify->fd); ^ ../src/bindings.cc:138:50: error: ‘class NodeInotify::Inotify’ has no member named ‘read_watcher’ uv_poll_init(uv_default_loop(), inotify->read_watcher, inotify->fd); ^ ../src/bindings.cc:138:75: error: ‘uv_poll_init’ was not declared in this scope uv_poll_init(uv_default_loop(), inotify->read_watcher, inotify->fd); ^ ../src/bindings.cc:139:32: error: ‘class NodeInotify::Inotify’ has no member named ‘read_watcher’ uv_poll_start(inotify->read_watcher, UV_READABLE, Inotify::Callback); ^ ../src/bindings.cc:139:46: error: ‘UV_READABLE’ was not declared in this scope uv_poll_start(inotify->read_watcher, UV_READABLE, Inotify::Callback); ^ ../src/bindings.cc:139:76: error: ‘uv_poll_start’ was not declared in this scope uv_poll_start(inotify->read_watcher, UV_READABLE, Inotify::Callback); ^ ../src/bindings.cc:142:34: error: request for member ‘This’ in ‘args’, which is of non-class type ‘const int’ Local<Object> obj = args.This(); ^ ../src/bindings.cc:147:23: error: ‘uv_handle_t’ was not declared in this scope uv_unref((uv_handle_t *) inotify->read_watcher); ^ ../src/bindings.cc:147:36: error: expected primary-expression before ‘)’ token uv_unref((uv_handle_t *) inotify->read_watcher); ^ ../src/bindings.cc:147:59: error: ‘uv_unref’ was not declared in this scope uv_unref((uv_handle_t *) inotify->read_watcher); ^ ../src/bindings.cc:156:22: error: ‘class v8::HandleScope’ has no member named ‘Close’ return scope.Close(obj); ^ ../src/bindings.cc: At global scope: ../src/bindings.cc:159:43: error: ‘Arguments’ does not name a type Handle<Value> Inotify::AddWatch(const Arguments& args) { ^ ../src/bindings.cc:159:54: error: ISO C++ forbids declaration of ‘args’ with no type [-fpermissive] Handle<Value> Inotify::AddWatch(const Arguments& args) { ^ In file included from /home/aaa/.node-gyp/0.12.2/src/node.h:61:0, from ../src/node_inotify.h:5, from ../src/bindings.h:4, from ../src/bindings.cc:2: /home/aaa/.node-gyp/0.12.2/deps/v8/include/v8.h: In static member function ‘static v8::Handle<v8::Value> NodeInotify::Inotify::AddWatch(const int&)’: /home/aaa/.node-gyp/0.12.2/deps/v8/include/v8.h:816:13: error: ‘v8::HandleScope::HandleScope()’ is protected V8_INLINE HandleScope() {} ^ ../src/bindings.cc:160:21: error: within this context HandleScope scope; ^ ../src/bindings.cc:164:17: error: request for member ‘Length’ in ‘args’, which is of non-class type ‘const int’ if(args.Length() < 1 || !args[0]->IsObject()) { ^ ../src/bindings.cc:164:40: error: invalid types ‘const int[int]’ for array subscript if(args.Length() < 1 || !args[0]->IsObject()) { ^ ../src/bindings.cc:166:13: error: ‘New’ is not a member of ‘v8::String’ String::New("You must specify an object as first argument"))); ^ ../src/bindings.cc:166:73: error: ‘ThrowException’ was not declared in this scope String::New("You must specify an object as first argument"))); ^ ../src/bindings.cc:169:37: error: invalid types ‘const int[int]’ for array subscript Local<Object> args_ = args[0]->ToObject(); ^ ../src/bindings.cc:171:32: error: no matching function for call to ‘v8::Object::Has(v8::Persistent<v8::String>&)’ if(!args_->Has(path_sym)) { ^ ../src/bindings.cc:171:32: note: candidates are: In file included from /home/aaa/.node-gyp/0.12.2/src/node.h:61:0, from ../src/node_inotify.h:5, from ../src/bindings.h:4, from ../src/bindings.cc:2: /home/aaa/.node-gyp/0.12.2/deps/v8/include/v8.h:2144:8: note: bool v8::Object::Has(v8::Handle<v8::Value>) bool Has(Handle<Value> key); ^ /home/aaa/.node-gyp/0.12.2/deps/v8/include/v8.h:2144:8: note: no known conversion for argument 1 from ‘v8::Persistent<v8::String>’ to ‘v8::Handle<v8::Value>’ /home/aaa/.node-gyp/0.12.2/deps/v8/include/v8.h:2152:8: note: bool v8::Object::Has(uint32_t) bool Has(uint32_t index); ^ /home/aaa/.node-gyp/0.12.2/deps/v8/include/v8.h:2152:8: note: no known conversion for argument 1 from ‘v8::Persistent<v8::String>’ to ‘uint32_t {aka unsigned int}’ ../src/bindings.cc:173:13: error: ‘New’ is not a member of ‘v8::String’ String::New("You must specify a path to watch for events"))); ^ ../src/bindings.cc:173:72: error: ‘ThrowException’ was not declared in this scope String::New("You must specify a path to watch for events"))); ^ ../src/bindings.cc:176:36: error: no matching function for call to ‘v8::Object::Has(v8::Persistent<v8::String>&)’ if(!args_->Has(callback_sym) || ^ ../src/bindings.cc:176:36: note: candidates are: In file included from /home/aaa/.node-gyp/0.12.2/src/node.h:61:0, from ../src/node_inotify.h:5, from ../src/bindings.h:4, from ../src/bindings.cc:2: /home/aaa/.node-gyp/0.12.2/deps/v8/include/v8.h:2144:8: note: bool v8::Object::Has(v8::Handle<v8::Value>) bool Has(Handle<Value> key); ^ /home/aaa/.node-gyp/0.12.2/deps/v8/include/v8.h:2144:8: note: no known conversion for argument 1 from ‘v8::Persistent<v8::String>’ to ‘v8::Handle<v8::Value>’ /home/aaa/.node-gyp/0.12.2/deps/v8/include/v8.h:2152:8: note: bool v8::Object::Has(uint32_t) bool Has(uint32_t index); ^ /home/aaa/.node-gyp/0.12.2/deps/v8/include/v8.h:2152:8: note: no known conversion for argument 1 from ‘v8::Persistent<v8::String>’ to ‘uint32_t {aka unsigned int}’ ../src/bindings.cc:177:37: error: no matching function for call to ‘v8::Object::Get(v8::Persistent<v8::String>&)’ !args_->Get(callback_sym)->IsFunction()) { ^ ../src/bindings.cc:177:37: note: candidates are: In file included from /home/aaa/.node-gyp/0.12.2/src/node.h:61:0, from ../src/node_inotify.h:5, from ../src/bindings.h:4, from ../src/bindings.cc:2: /home/aaa/.node-gyp/0.12.2/deps/v8/include/v8.h:2128:16: note: v8::Local<v8::Value> v8::Object::Get(v8::Handle<v8::Value>) Local<Value> Get(Handle<Value> key); ^ /home/aaa/.node-gyp/0.12.2/deps/v8/include/v8.h:2128:16: note: no known conversion for argument 1 from ‘v8::Persistent<v8::String>’ to ‘v8::Handle<v8::Value>’ /home/aaa/.node-gyp/0.12.2/deps/v8/include/v8.h:2130:16: note: v8::Local<v8::Value> v8::Object::Get(uint32_t) Local<Value> Get(uint32_t index); ^ /home/aaa/.node-gyp/0.12.2/deps/v8/include/v8.h:2130:16: note: no known conversion for argument 1 from ‘v8::Persistent<v8::String>’ to ‘uint32_t {aka unsigned int}’ ../src/bindings.cc:179:13: error: ‘New’ is not a member of ‘v8::String’ String::New("You must specify a callback function"))); ^ ../src/bindings.cc:179:65: error: ‘ThrowException’ was not declared in this scope String::New("You must specify a callback function"))); ^ ../src/bindings.cc:182:37: error: no matching function for call to ‘v8::Object::Has(v8::Persistent<v8::String>&)’ if(!args_->Has(watch_for_sym)) { ^ ../src/bindings.cc:182:37: note: candidates are: In file included from /home/aaa/.node-gyp/0.12.2/src/node.h:61:0, from ../src/node_inotify.h:5, from ../src/bindings.h:4, from ../src/bindings.cc:2: /home/aaa/.node-gyp/0.12.2/deps/v8/include/v8.h:2144:8: note: bool v8::Object::Has(v8::Handle<v8::Value>) bool Has(Handle<Value> key); ^ /home/aaa/.node-gyp/0.12.2/deps/v8/include/v8.h:2144:8: note: no known conversion for argument 1 from ‘v8::Persistent<v8::String>’ to ‘v8::Handle<v8::Value>’ /home/aaa/.node-gyp/0.12.2/deps/v8/include/v8.h:2152:8: note: bool v8::Object::Has(uint32_t) bool Has(uint32_t index); ^ /home/aaa/.node-gyp/0.12.2/deps/v8/include/v8.h:2152:8: note: no known conversion for argument 1 from ‘v8::Persistent<v8::String>’ to ‘uint32_t {aka unsigned int}’ ../src/bindings.cc:185:41: error: no matching function for call to ‘v8::Object::Get(v8::Persistent<v8::String>&)’ if(!args_->Get(watch_for_sym)->IsInt32()) { ^ ../src/bindings.cc:185:41: note: candidates are: In file included from /home/aaa/.node-gyp/0.12.2/src/node.h:61:0, from ../src/node_inotify.h:5, from ../src/bindings.h:4, from ../src/bindings.cc:2: /home/aaa/.node-gyp/0.12.2/deps/v8/include/v8.h:2128:16: note: v8::Local<v8::Value> v8::Object::Get(v8::Handle<v8::Value>) Local<Value> Get(Handle<Value> key); ^ /home/aaa/.node-gyp/0.12.2/deps/v8/include/v8.h:2128:16: note: no known conversion for argument 1 from ‘v8::Persistent<v8::String>’ to ‘v8::Handle<v8::Value>’ /home/aaa/.node-gyp/0.12.2/deps/v8/include/v8.h:2130:16: note: v8::Local<v8::Value> v8::Object::Get(uint32_t) Local<Value> Get(uint32_t index); ^ /home/aaa/.node-gyp/0.12.2/deps/v8/include/v8.h:2130:16: note: no known conversion for argument 1 from ‘v8::Persistent<v8::String>’ to ‘uint32_t {aka unsigned int}’ ../src/bindings.cc:187:17: error: ‘New’ is not a member of ‘v8::String’ String::New("You must specify OR'ed set of events"))); ^ ../src/bindings.cc:187:69: error: ‘ThrowException’ was not declared in this scope String::New("You must specify OR'ed set of events"))); ^ ../src/bindings.cc:189:45: error: no matching function for call to ‘v8::Object::Get(v8::Persistent<v8::String>&)’ mask |= args_->Get(watch_for_sym)->Int32Value(); ^ ../src/bindings.cc:189:45: note: candidates are: In file included from /home/aaa/.node-gyp/0.12.2/src/node.h:61:0, from ../src/node_inotify.h:5, from ../src/bindings.h:4, from ../src/bindings.cc:2: /home/aaa/.node-gyp/0.12.2/deps/v8/include/v8.h:2128:16: note: v8::Local<v8::Value> v8::Object::Get(v8::Handle<v8::Value>) Local<Value> Get(Handle<Value> key); ^ /home/aaa/.node-gyp/0.12.2/deps/v8/include/v8.h:2128:16: note: no known conversion for argument 1 from ‘v8::Persistent<v8::String>’ to ‘v8::Handle<v8::Value>’ /home/aaa/.node-gyp/0.12.2/deps/v8/include/v8.h:2130:16: note: v8::Local<v8::Value> v8::Object::Get(uint32_t) Local<Value> Get(uint32_t index); ^ /home/aaa/.node-gyp/0.12.2/deps/v8/include/v8.h:2130:16: note: no known conversion for argument 1 from ‘v8::Persistent<v8::String>’ to ‘uint32_t {aka unsigned int}’ ../src/bindings.cc:192:17: error: ‘New’ is not a member of ‘v8::String’ String::New("You must specify OR'ed set of events"))); ^ ../src/bindings.cc:192:69: error: ‘ThrowException’ was not declared in this scope String::New("You must specify OR'ed set of events"))); ^ ../src/bindings.cc:196:51: error: no matching function for call to ‘v8::Object::Get(v8::Persistent<v8::String>&)’ String::Utf8Value path(args_->Get(path_sym)); ^ ../src/bindings.cc:196:51: note: candidates are: In file included from /home/aaa/.node-gyp/0.12.2/src/node.h:61:0, from ../src/node_inotify.h:5, from ../src/bindings.h:4, from ../src/bindings.cc:2: /home/aaa/.node-gyp/0.12.2/deps/v8/include/v8.h:2128:16: note: v8::Local<v8::Value> v8::Object::Get(v8::Handle<v8::Value>) Local<Value> Get(Handle<Value> key); ^ /home/aaa/.node-gyp/0.12.2/deps/v8/include/v8.h:2128:16: note: no known conversion for argument 1 from ‘v8::Persistent<v8::String>’ to ‘v8::Handle<v8::Value>’ /home/aaa/.node-gyp/0.12.2/deps/v8/include/v8.h:2130:16: note: v8::Local<v8::Value> v8::Object::Get(uint32_t) Local<Value> Get(uint32_t index); ^ /home/aaa/.node-gyp/0.12.2/deps/v8/include/v8.h:2130:16: note: no known conversion for argument 1 from ‘v8::Persistent<v8::String>’ to ‘uint32_t {aka unsigned int}’ ../src/bindings.cc:198:61: error: request for member ‘This’ in ‘args’, which is of non-class type ‘const int’ Inotify *inotify = ObjectWrap::Unwrap<Inotify>(args.This()); ^ ../src/bindings.cc:203:66: error: no matching function for call to ‘v8::Integer::New(int&)’ Local<Integer> descriptor = Integer::New(watch_descriptor); ^ ../src/bindings.cc:203:66: note: candidate is: In file included from /home/aaa/.node-gyp/0.12.2/src/node.h:61:0, from ../src/node_inotify.h:5, from ../src/bindings.h:4, from ../src/bindings.cc:2: /home/aaa/.node-gyp/0.12.2/deps/v8/include/v8.h:2012:25: note: static v8::Local<v8::Integer> v8::Integer::New(v8::Isolate*, int32_t) static Local<Integer> New(Isolate* isolate, int32_t value); ^ /home/aaa/.node-gyp/0.12.2/deps/v8/include/v8.h:2012:25: note: candidate expects 2 arguments, 1 provided In file included from ../src/node_inotify.h:6:0, from ../src/bindings.h:4, from ../src/bindings.cc:2: /home/aaa/.node-gyp/0.12.2/src/node_object_wrap.h:132:30: error: ‘v8::Persistent<v8::Object> node::ObjectWrap::handle_’ is private v8::Persistent<v8::Object> handle_; ^ ../src/bindings.cc:206:18: error: within this context inotify->handle_->Set(descriptor, args_->Get(callback_sym)); ^ ../src/bindings.cc:206:25: error: base operand of ‘->’ has non-pointer type ‘v8::Persistent<v8::Object>’ inotify->handle_->Set(descriptor, args_->Get(callback_sym)); ^ ../src/bindings.cc:206:66: error: no matching function for call to ‘v8::Object::Get(v8::Persistent<v8::String>&)’ inotify->handle_->Set(descriptor, args_->Get(callback_sym)); ^ ../src/bindings.cc:206:66: note: candidates are: In file included from /home/aaa/.node-gyp/0.12.2/src/node.h:61:0, from ../src/node_inotify.h:5, from ../src/bindings.h:4, from ../src/bindings.cc:2: /home/aaa/.node-gyp/0.12.2/deps/v8/include/v8.h:2128:16: note: v8::Local<v8::Value> v8::Object::Get(v8::Handle<v8::Value>) Local<Value> Get(Handle<Value> key); ^ /home/aaa/.node-gyp/0.12.2/deps/v8/include/v8.h:2128:16: note: no known conversion for argument 1 from ‘v8::Persistent<v8::String>’ to ‘v8::Handle<v8::Value>’ /home/aaa/.node-gyp/0.12.2/deps/v8/include/v8.h:2130:16: note: v8::Local<v8::Value> v8::Object::Get(uint32_t) Local<Value> Get(uint32_t index); ^ /home/aaa/.node-gyp/0.12.2/deps/v8/include/v8.h:2130:16: note: no known conversion for argument 1 from ‘v8::Persistent<v8::String>’ to ‘uint32_t {aka unsigned int}’ ../src/bindings.cc:208:22: error: ‘class v8::HandleScope’ has no member named ‘Close’ return scope.Close(descriptor); ^ ../src/bindings.cc: At global scope: ../src/bindings.cc:211:46: error: ‘Arguments’ does not name a type Handle<Value> Inotify::RemoveWatch(const Arguments& args) { ^ ../src/bindings.cc:211:57: error: ISO C++ forbids declaration of ‘args’ with no type [-fpermissive] Handle<Value> Inotify::RemoveWatch(const Arguments& args) { ^ In file included from /home/aaa/.node-gyp/0.12.2/src/node.h:61:0, from ../src/node_inotify.h:5, from ../src/bindings.h:4, from ../src/bindings.cc:2: /home/aaa/.node-gyp/0.12.2/deps/v8/include/v8.h: In static member function ‘static v8::Handle<v8::Value> NodeInotify::Inotify::RemoveWatch(const int&)’: /home/aaa/.node-gyp/0.12.2/deps/v8/include/v8.h:816:13: error: ‘v8::HandleScope::HandleScope()’ is protected V8_INLINE HandleScope() {} ^ ../src/bindings.cc:212:21: error: within this context HandleScope scope; ^ ../src/bindings.cc:216:17: error: request for member ‘Length’ in ‘args’, which is of non-class type ‘const int’ if(args.Length() == 0 || !args[0]->IsInt32()) { ^ ../src/bindings.cc:216:41: error: invalid types ‘const int[int]’ for array subscript if(args.Length() == 0 || !args[0]->IsInt32()) { ^ ../src/bindings.cc:218:13: error: ‘New’ is not a member of ‘v8::String’ String::New("You must specify a valid watcher descriptor as argument"))); ^ ../src/bindings.cc:218:84: error: ‘ThrowException’ was not declared in this scope String::New("You must specify a valid watcher descriptor as argument"))); ^ ../src/bindings.cc:220:23: error: invalid types ‘const int[int]’ for array subscript watch = args[0]->Int32Value(); ^ ../src/bindings.cc:222:61: error: request for member ‘This’ in ‘args’, which is of non-class type ‘const int’ Inotify *inotify = ObjectWrap::Unwrap<Inotify>(args.This()); ^ ../src/bindings.cc:226:28: error: ‘New’ is not a member of ‘v8::String’ ThrowException(String::New(strerror(errno))); ^ ../src/bindings.cc:226:56: error: ‘ThrowException’ was not declared in this scope ThrowException(String::New(strerror(errno))); ^ ../src/bindings.cc:227:26: error: too few arguments to function ‘v8::Handle<v8::Boolean> v8::False(v8::Isolate*)’ return False(); ^ In file included from /home/aaa/.node-gyp/0.12.2/src/node.h:61:0, from ../src/node_inotify.h:5, from ../src/bindings.h:4, from ../src/bindings.cc:2: /home/aaa/.node-gyp/0.12.2/deps/v8/include/v8.h:6633:17: note: declared here Handle<Boolean> False(Isolate* isolate) { ^ ../src/bindings.cc:230:21: error: too few arguments to function ‘v8::Handle<v8::Boolean> v8::True(v8::Isolate*)’ return True(); ^ In file included from /home/aaa/.node-gyp/0.12.2/src/node.h:61:0, from ../src/node_inotify.h:5, from ../src/bindings.h:4, from ../src/bindings.cc:2: /home/aaa/.node-gyp/0.12.2/deps/v8/include/v8.h:6624:17: note: declared here Handle<Boolean> True(Isolate* isolate) { ^ ../src/bindings.cc: At global scope: ../src/bindings.cc:233:35: error: variable or field ‘on_handle_close’ declared void void Inotify::on_handle_close(uv_handle_t* handle) { ^ ../src/bindings.cc:233:35: error: ‘uv_handle_t’ was not declared in this scope ../src/bindings.cc:233:48: error: ‘handle’ was not declared in this scope void Inotify::on_handle_close(uv_handle_t* handle) { ^ ../src/bindings.cc:238:40: error: ‘Arguments’ does not name a type Handle<Value> Inotify::Close(const Arguments& args) { ^ ../src/bindings.cc:238:51: error: ISO C++ forbids declaration of ‘args’ with no type [-fpermissive] Handle<Value> Inotify::Close(const Arguments& args) { ^ In file included from /home/aaa/.node-gyp/0.12.2/src/node.h:61:0, from ../src/node_inotify.h:5, from ../src/bindings.h:4, from ../src/bindings.cc:2: /home/aaa/.node-gyp/0.12.2/deps/v8/include/v8.h: In static member function ‘static v8::Handle<v8::Value> NodeInotify::Inotify::Close(const int&)’: /home/aaa/.node-gyp/0.12.2/deps/v8/include/v8.h:816:13: error: ‘v8::HandleScope::HandleScope()’ is protected V8_INLINE HandleScope() {} ^ ../src/bindings.cc:239:21: error: within this context HandleScope scope; ^ ../src/bindings.cc:242:61: error: request for member ‘This’ in ‘args’, which is of non-class type ‘const int’ Inotify *inotify = ObjectWrap::Unwrap<Inotify>(args.This()); ^ ../src/bindings.cc:246:28: error: ‘New’ is not a member of ‘v8::String’ ThrowException(String::New(strerror(errno))); ^ ../src/bindings.cc:246:56: error: ‘ThrowException’ was not declared in this scope ThrowException(String::New(strerror(errno))); ^ ../src/bindings.cc:247:26: error: too few arguments to function ‘v8::Handle<v8::Boolean> v8::False(v8::Isolate*)’ return False(); ^ In file included from /home/aaa/.node-gyp/0.12.2/src/node.h:61:0, from ../src/node_inotify.h:5, from ../src/bindings.h:4, from ../src/bindings.cc:2: /home/aaa/.node-gyp/0.12.2/deps/v8/include/v8.h:6633:17: note: declared here Handle<Boolean> False(Isolate* isolate) { ^ ../src/bindings.cc:252:21: error: ‘uv_handle_t’ was not declared in this scope uv_ref((uv_handle_t *) inotify->read_watcher); ^ ../src/bindings.cc:252:34: error: expected primary-expression before ‘)’ token uv_ref((uv_handle_t *) inotify->read_watcher); ^ ../src/bindings.cc:252:57: error: ‘uv_ref’ was not declared in this scope uv_ref((uv_handle_t *) inotify->read_watcher); ^ ../src/bindings.cc:264:21: error: too few arguments to function ‘v8::Handle<v8::Boolean> v8::True(v8::Isolate*)’ return True(); ^ In file included from /home/aaa/.node-gyp/0.12.2/src/node.h:61:0, from ../src/node_inotify.h:5, from ../src/bindings.h:4, from ../src/bindings.cc:2: /home/aaa/.node-gyp/0.12.2/deps/v8/include/v8.h:6624:17: note: declared here Handle<Boolean> True(Isolate* isolate) { ^ ../src/bindings.cc: At global scope: ../src/bindings.cc:267:28: error: variable or field ‘Callback’ declared void void Inotify::Callback(uv_poll_t *watcher, int status, int revents) { ^ ../src/bindings.cc:267:28: error: ‘uv_poll_t’ was not declared in this scope ../src/bindings.cc:267:39: error: ‘watcher’ was not declared in this scope void Inotify::Callback(uv_poll_t *watcher, int status, int revents) { ^ ../src/bindings.cc:267:48: error: expected primary-expression before ‘int’ void Inotify::Callback(uv_poll_t *watcher, int status, int revents) { ^ ../src/bindings.cc:267:60: error: expected primary-expression before ‘int’ void Inotify::Callback(uv_poll_t *watcher, int status, int revents) { ^ ../src/bindings.cc:332:1: error: expected ‘}’ at end of input }//namespace NodeInotify ^ ../src/bindings.cc: In static member function ‘static v8::Handle<v8::Value> NodeInotify::Inotify::New(const int&)’: ../src/bindings.cc:157:5: warning: control reaches end of non-void function [-Wreturn-type] } ^ ../src/bindings.cc: In static member function ‘static v8::Handle<v8::Value> NodeInotify::Inotify::AddWatch(const int&)’: ../src/bindings.cc:209:5: warning: control reaches end of non-void function [-Wreturn-type] } ^ ../src/bindings.cc: In static member function ‘static v8::Handle<v8::Value> NodeInotify::Inotify::RemoveWatch(const int&)’: ../src/bindings.cc:231:5: warning: control reaches end of non-void function [-Wreturn-type] } ^ ../src/bindings.cc: In static member function ‘static v8::Handle<v8::Value> NodeInotify::Inotify::Close(const int&)’: ../src/bindings.cc:265:5: warning: control reaches end of non-void function [-Wreturn-type] } ^ make: *** [Release/obj.target/inotify/src/bindings.o] Error 1 make: Leaving directory/home/aaa/node_modules/inotify/build'
gyp ERR! build error
gyp ERR! stack Error: make failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/usr/local/lib/node_modules/node-gyp/lib/build.js:269:23)
gyp ERR! stack at ChildProcess.emit (events.js:110:17)
gyp ERR! stack at Process.ChildProcess._handle.onexit (child_process.js:1074:12)
gyp ERR! System Linux 3.13.0-49-generic
gyp ERR! command "node" "/usr/local/bin/node-gyp" "build"
gyp ERR! cwd /home/aaa/node_modules/inotify
gyp ERR! node -v v0.12.2
gyp ERR! node-gyp -v v1.0.3
gyp ERR! not ok

error install ubuntu x86

I install this module in ubuntu x86 32 bit (ubuntu server x86 14.04.4 && 14.04.5):
sudo npm install inotify
has error:

> node-gyp rebuild

gyp ERR! build error 
gyp ERR! stack Error: not found: make
gyp ERR! stack     at getNotFoundError (/usr/lib/node_modules/npm/node_modules/which/which.js:14:12)
gyp ERR! stack     at F (/usr/lib/node_modules/npm/node_modules/which/which.js:69:19)
gyp ERR! stack     at E (/usr/lib/node_modules/npm/node_modules/which/which.js:81:29)
gyp ERR! stack     at /usr/lib/node_modules/npm/node_modules/which/which.js:90:16
gyp ERR! stack     at /usr/lib/node_modules/npm/node_modules/which/node_modules/isexe/index.js:44:5
gyp ERR! stack     at /usr/lib/node_modules/npm/node_modules/which/node_modules/isexe/access.js:8:5
gyp ERR! stack     at FSReqWrap.oncomplete (fs.js:123:15)
gyp ERR! System Linux 4.2.0-42-generic
gyp ERR! command "/usr/bin/nodejs" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /home/tanmv/nodejs/node_modules/inotify
gyp ERR! node -v v6.3.1
gyp ERR! node-gyp -v v3.3.1
gyp ERR! not ok 
npm WARN enoent ENOENT: no such file or directory, open '/home/tanmv/nodejs/package.json'
npm WARN nodejs No description
npm WARN nodejs No repository field.
npm WARN nodejs No README data
npm WARN nodejs No license field.
npm ERR! Linux 4.2.0-42-generic
npm ERR! argv "/usr/bin/nodejs" "/usr/bin/npm" "install" "inotify"
npm ERR! node v6.3.1
npm ERR! npm  v3.10.3
npm ERR! code ELIFECYCLE

npm ERR! [email protected] install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the [email protected] install script 'node-gyp rebuild'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the inotify package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     node-gyp rebuild
npm ERR! You can get information on how to open an issue for this project with:
npm ERR!     npm bugs inotify
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!     npm owner ls inotify
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     /home/tanmv/nodejs/npm-debug.log

Add support, create new repo for fanotify

I was looking for a patch or something that would allow for PID/GID/UID meta-data to be reported when filesystem events occurred. After some looking, it appears the kernel team are working on revamping the inotify system. They are re-branding it with fanotify from what I can tell and it appears to be much cooler than inotify.

Here's the include in linux/fanotify.h:
http://git.infradead.org/users/eparis/notify.git/blob/HEAD:/include/linux/fanotify.h

Love the library and keep up the great work :)

can't install with node v0.8.1 and npm v1.1.33

npm install inotify
npm http GET https://registry.npmjs.org/inotify
npm http 304 https://registry.npmjs.org/inotify

> [email protected] install /Users/coolaj86/Code/node-inotify++/node_modules/inotify
> node-waf configure build

Traceback (most recent call last):
  File "/usr/local/bin/node-waf", line 14, in <module>
    import Scripting
ImportError: No module named Scripting
npm ERR! [email protected] install: `node-waf configure build`
npm ERR! `sh "-c" "node-waf configure build"` failed with 1
npm ERR! 
npm ERR! Failed at the [email protected] install script.
npm ERR! This is most likely a problem with the inotify package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     node-waf configure build
npm ERR! You can get their info via:
npm ERR!     npm owner ls inotify
npm ERR! There is likely additional logging output above.

npm ERR! System Darwin 12.1.0
npm ERR! command "node" "/usr/local/bin/npm" "install" "inotify"
npm ERR! cwd /Users/coolaj86/Code/node-inotify++
npm ERR! node -v v0.8.1
npm ERR! npm -v 1.1.33
npm ERR! code ELIFECYCLE
npm ERR! message [email protected] install: `node-waf configure build`
npm ERR! message `sh "-c" "node-waf configure build"` failed with 1
npm ERR! 
npm ERR! Additional logging details can be found in:
npm ERR!     /Users/coolaj86/Code/node-inotify++/npm-debug.log
npm ERR! not ok code 0

npm install inotify: hard-coded to use "/home/camilo/Development/node-inotify/build" ?

npm install inotify
npm info it worked if it ends with ok
....
Checking for function inotify_init       : not found
'configure' finished successfully (2.158s)
Waf: Entering directory `/home/camilo/Development/node-inotify/build'
Waf: Leaving directory `/home/camilo/Development/node-inotify/build'
Traceback (most recent call last):
....
OSError: [Errno 2] No such file or directory: '/home/camilo/Development/node-inotify/build'

Broken dependency

Hello c4milo, I have the following error after installing via 'sudo npm install':

module.js:333
throw err;
^
Error: Cannot find module './build/Debug/inotify'
at Function.Module._resolveFilename (module.js:331:15)
at Function.Module._load (module.js:273:25)
at Module.require (module.js:357:17)
at require (module.js:373:17)
at Object. ([PATH TO THE PROJECT]/node_modules/inotify/inotify.js:4:22)
at Module._compile (module.js:449:26)
at Object.Module._extensions..js (module.js:467:10)
at Module.load (module.js:349:32)
at Function.Module._load (module.js:305:12)
at Module.require (module.js:357:17)

Please advise.

Installation Error on Mac

I've encountered the following error during installation. I'm running npm 2.5.1 on OSX 10.10

0 info it worked if it ends with ok
1 verbose cli [ 'node', '/usr/local/bin/npm', 'install', 'inotify' ]
2 info using [email protected]
3 info using [email protected]
4 verbose node symlink /usr/local/bin/node
5 silly cache add args [ 'inotify', null ]
6 verbose cache add spec inotify
7 silly cache add parsed spec { raw: 'inotify',
7 silly cache add   scope: null,
7 silly cache add   name: 'inotify',
7 silly cache add   rawSpec: '',
7 silly cache add   spec: '*',
7 silly cache add   type: 'range' }
8 verbose addNamed inotify@*
9 silly addNamed semver.valid null
10 silly addNamed semver.validRange *
11 silly addNameRange { name: 'inotify', range: '*', hasData: false }
12 silly mapToRegistry name inotify
13 silly mapToRegistry using default registry
14 silly mapToRegistry registry https://registry.npmjs.org/
15 silly mapToRegistry uri https://registry.npmjs.org/inotify
16 verbose addNameRange registry:https://registry.npmjs.org/inotify not in flight; fetching
17 verbose request uri https://registry.npmjs.org/inotify
18 verbose request no auth needed
19 info attempt registry request try #1 at 15:25:57
20 verbose request id 70914ccc163312de
21 verbose etag "1TTYMECKK1TEJXSHL9RPZNKRZ"
22 http request GET https://registry.npmjs.org/inotify
23 http 200 https://registry.npmjs.org/inotify
24 silly get cb [ 200,
24 silly get   { date: 'Thu, 05 Mar 2015 07:25:58 GMT',
24 silly get     server: 'CouchDB/1.5.0 (Erlang OTP/R16B03)',
24 silly get     etag: '"39-cd0a9e0275f515f8c1648ed73f21e3a4"',
24 silly get     'content-type': 'application/json',
24 silly get     'cache-control': 'max-age=60',
24 silly get     'content-length': '22923',
24 silly get     'accept-ranges': 'bytes',
24 silly get     via: '1.1 varnish',
24 silly get     age: '0',
24 silly get     'x-served-by': 'cache-nrt6132-NRT',
24 silly get     'x-cache': 'MISS',
24 silly get     'x-cache-hits': '0',
24 silly get     'x-timer': 'S1425540358.114764,VS0,VE209',
24 silly get     'keep-alive': 'timeout=10, max=50',
24 silly get     connection: 'Keep-Alive' } ]
25 verbose get saving inotify to /Users/angelawang/.npm/registry.npmjs.org/inotify/.cache.json
26 silly addNameRange number 2 { name: 'inotify', range: '*', hasData: true }
27 silly addNameRange versions [ 'inotify',
27 silly addNameRange   [ '0.1.2',
27 silly addNameRange     '0.1.3',
27 silly addNameRange     '0.1.4',
27 silly addNameRange     '0.1.5',
27 silly addNameRange     '0.1.6',
27 silly addNameRange     '0.1.7',
27 silly addNameRange     '0.1.8',
27 silly addNameRange     '0.2.0',
27 silly addNameRange     '0.2.1',
27 silly addNameRange     '0.2.2',
27 silly addNameRange     '1.0.0',
27 silly addNameRange     '1.1.0',
27 silly addNameRange     '1.2.0',
27 silly addNameRange     '1.2.1' ] ]
28 verbose addNamed [email protected]
29 silly addNamed semver.valid 1.2.1
30 silly addNamed semver.validRange 1.2.1
31 silly cache afterAdd [email protected]
32 verbose afterAdd /Users/angelawang/.npm/inotify/1.2.1/package/package.json not in flight; writing
33 verbose afterAdd /Users/angelawang/.npm/inotify/1.2.1/package/package.json written
34 silly install resolved [ { name: 'inotify',
34 silly install resolved     version: '1.2.1',
34 silly install resolved     author: { name: 'Camilo Aguilar', email: '[email protected]' },
34 silly install resolved     email: '[email protected]',
34 silly install resolved     keywords:
34 silly install resolved      [ 'inotify',
34 silly install resolved        'watch',
34 silly install resolved        'monitor',
34 silly install resolved        'watch files',
34 silly install resolved        'watch directories' ],
34 silly install resolved     description: 'inotify bindings for v8 javascript engine',
34 silly install resolved     repository: { type: 'git', url: 'http://github.com/c4milo/node-inotify' },
34 silly install resolved     engines: { node: '>=0.8' },
34 silly install resolved     main: 'inotify',
34 silly install resolved     scripts: { install: 'node-gyp rebuild' },
34 silly install resolved     gypfile: true,
34 silly install resolved     contributors: [ [Object], [Object], [Object], [Object], [Object], [Object] ],
34 silly install resolved     _id: '[email protected]',
34 silly install resolved     dist:
34 silly install resolved      { shasum: 'dd3465d3739998cdfb1f1d5b0a38ca51478dfc32',
34 silly install resolved        tarball: 'http://registry.npmjs.org/inotify/-/inotify-1.2.1.tgz' },
34 silly install resolved     _from: 'inotify@*',
34 silly install resolved     _npmVersion: '1.2.14',
34 silly install resolved     _npmUser: { name: 'c4milo', email: '[email protected]' },
34 silly install resolved     maintainers: [ [Object], [Object] ],
34 silly install resolved     directories: {},
34 silly install resolved     _shasum: 'dd3465d3739998cdfb1f1d5b0a38ca51478dfc32',
34 silly install resolved     _resolved: 'https://registry.npmjs.org/inotify/-/inotify-1.2.1.tgz',
34 silly install resolved     bugs: { url: 'https://github.com/c4milo/node-inotify/issues' },
34 silly install resolved     readme: 'ERROR: No README data found!',
34 silly install resolved     homepage: 'https://github.com/c4milo/node-inotify' } ]
35 info install [email protected] into /private/var/www/vue-hackernews
36 info installOne [email protected]
37 verbose installOne of inotify to /private/var/www/vue-hackernews not in flight; installing
38 verbose lock using /Users/angelawang/.npm/_locks/inotify-a49081cb22806c8a.lock for /private/var/www/vue-hackernews/node_modules/inotify
39 silly install write writing inotify 1.2.1 to /private/var/www/vue-hackernews/node_modules/inotify
40 silly cache addNamed cb [email protected]
41 verbose unbuild node_modules/inotify
42 verbose gentlyRm vacuuming /private/var/www/vue-hackernews/node_modules/inotify
43 verbose tar unpack /Users/angelawang/.npm/inotify/1.2.1/package.tgz
44 verbose tar unpacking to /private/var/www/vue-hackernews/node_modules/inotify
45 verbose gentlyRm vacuuming /private/var/www/vue-hackernews/node_modules/inotify
46 silly gunzTarPerm modes [ '755', '644' ]
47 silly gunzTarPerm extractEntry package.json
48 silly gunzTarPerm extractEntry .npmignore
49 silly gunzTarPerm extractEntry README.md
50 silly gunzTarPerm extractEntry LICENSE
51 silly gunzTarPerm extractEntry example.js
52 silly gunzTarPerm extractEntry inotify.js
53 silly gunzTarPerm extractEntry AUTHORS
54 silly gunzTarPerm extractEntry binding.gyp
55 silly gunzTarPerm extractEntry src/bindings.cc
56 silly gunzTarPerm extractEntry src/bindings.h
57 silly gunzTarPerm extractEntry src/node_inotify.cc
58 silly gunzTarPerm extractEntry src/node_inotify.h
59 info preinstall [email protected]
60 silly install resolved []
61 verbose about to build /private/var/www/vue-hackernews/node_modules/inotify
62 info build /private/var/www/vue-hackernews/node_modules/inotify
63 verbose linkStuff [ false,
63 verbose linkStuff   false,
63 verbose linkStuff   false,
63 verbose linkStuff   '/private/var/www/vue-hackernews/node_modules' ]
64 info linkStuff [email protected]
65 verbose linkBins [email protected]
66 verbose linkMans [email protected]
67 verbose rebuildBundles [email protected]
68 info install [email protected]
69 verbose unsafe-perm in lifecycle true
70 info [email protected] Failed to exec install script
71 verbose unlock done using /Users/angelawang/.npm/_locks/inotify-a49081cb22806c8a.lock for /private/var/www/vue-hackernews/node_modules/inotify
72 verbose stack Error: [email protected] install: `node-gyp rebuild`
72 verbose stack Exit status 1
72 verbose stack     at EventEmitter.<anonymous> (/usr/local/lib/node_modules/npm/lib/utils/lifecycle.js:213:16)
72 verbose stack     at EventEmitter.emit (events.js:110:17)
72 verbose stack     at ChildProcess.<anonymous> (/usr/local/lib/node_modules/npm/lib/utils/spawn.js:14:12)
72 verbose stack     at ChildProcess.emit (events.js:110:17)
72 verbose stack     at maybeClose (child_process.js:1008:16)
72 verbose stack     at Process.ChildProcess._handle.onexit (child_process.js:1080:5)
73 verbose pkgid [email protected]
74 verbose cwd /private/var/www/vue-hackernews
75 error Darwin 14.1.0
76 error argv "node" "/usr/local/bin/npm" "install" "inotify"
77 error node v0.12.0
78 error npm  v2.5.1
79 error code ELIFECYCLE
80 error [email protected] install: `node-gyp rebuild`
80 error Exit status 1
81 error Failed at the [email protected] install script 'node-gyp rebuild'.
81 error This is most likely a problem with the inotify package,
81 error not with npm itself.
81 error Tell the author that this fails on your system:
81 error     node-gyp rebuild
81 error You can get their info via:
81 error     npm owner ls inotify
81 error There is likely additional logging output above.
82 verbose exit [ 1, true ]
83 verbose unbuild node_modules/inotify
84 info preuninstall [email protected]
85 info uninstall [email protected]
86 verbose unbuild rmStuff [email protected] from /private/var/www/vue-hackernews/node_modules
87 info postuninstall [email protected]
88 verbose gentlyRm vacuuming /private/var/www/vue-hackernews/node_modules/inotify
89 silly gentlyRm purging /private/var/www/vue-hackernews/node_modules/inotify
90 silly gentlyRm removing /private/var/www/vue-hackernews/node_modules
91 silly gentlyRm finished vacuuming up to /private/var/www/vue-hackernews

Watching a particular file triggers IN_IGNORED

When I watch a directory, all is good. But when I watch a particular file like this:

var dir = { path: './file.txt',
  watch_for: Inotify.IN_ALL_EVENTS,
  callback: callback
};

And I open the file for writing , modify it and save it, here's the pattern of events:

Http server started
32
filewas opened 
8
file opened for writing was closed 
4
filemetadata changed 
1024
filewatched deleted 
32768
filewatch was removed

And the file stops getting monitored. Is this because the file temporary gets saved in goutputstream format ? I noticed this also triggers IN_DELETE_SELF along with IN_IGNORED , and it seems the latter is a consequence of the former.

src/wscript uses check_cc for headers, it should use check_cxx

At least it works on my debian/sid machine.
However, the function inotify_init is in sys/inotify.h, not in linux/inotify.h.
That might be a recent change in libc6, though.
This works for me :
conf.check_cxx(header_name="sys/inotify.h", function_name="inotify_init")

Promise.resolve() does not work correctly inside an inotify callback

Promise.resolve() returns an already resolved promise and therefore Promise.resolve().then(...) should execute the promise callback immediately. But when I try that from within an inotify callback, the promise callback never gets called. Here's a minimal example:

const Inotify = require("inotify").Inotify;

new Inotify().addWatch({
	path: ".",
	watch_for: Inotify.IN_ALL_EVENTS,
	callback: ev => {
		console.log("this is an inotify callback");
		Promise.resolve().then(() => {
			console.log("done");
		});
	},
});

When I run this with node v8.4.0 and do a touch . in a different terminal, I do not see done in the output.

recursive watching incorrect.

For code

var Inotify, callback, inotify, p, watch;

Inotify = require('inotify').Inotify;

p = console.info;

inotify = new Inotify();

callback = function(parent_path) {
  return function(event) {
    var mask, name, path;
    mask = event.mask, name = event.name;
    if (!name) {
      return;
    }
    path = parent_path + '/' + name;
    if (mask & Inotify.IN_ISDIR && mask & Inotify.IN_CREATE) {
      watch(path);
    }
    return null;
  };
};

watch = function(path) {
  p("watching " + path);
  return inotify.addWatch({
    path: path,
    watch_for: Inotify.IN_ALL_EVENTS,
    callback: callback(path)
  });
};

watch('.');

when run
mkdir a/b/c/d/e/f/g -p ; rm a -r

The script cannot watching ./a/b/c and deeper in my system.
but if repeat the command very quickly. there is small chance to watching deeper even reach g.

My system is
Linux 3.5.3
node 0.8.8

Thanks
Miao

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.