cjohansen/watch-tree — Issue #1: watch-tree won't build with node 0.6.11
Author: jodal
Created: 2012-02-22 15:03:45+00:00
State: open

Using node 0.6.11:

```
$ sudo npm install -g .
[sudo] password for sjodal:
npm http GET https://registry.npmjs.org/inotify
npm http 304 https://registry.npmjs.org/inotify

> inotify@0.1.6 install /usr/local/lib/node_modules/watch-tree/node_modules/inotify
> 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 : 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.120s)
Waf: Entering directory `/usr/local/lib/node_modules/watch-tree/node_modules/inotify/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.h:4:0,
from ../src/bindings.cc:2:
../src/node_inotify.h:6:25: fatal error: node_events.h: No such file or directory
compilation terminated.
In file included from ../src/bindings.h:4:0,
from ../src/node_inotify.cc:2:
../src/node_inotify.h:6:25: fatal error: node_events.h: No such file or directory
compilation terminated.
Waf: Leaving directory `/usr/local/lib/node_modules/watch-tree/node_modules/inotify/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}
npm ERR! error installing inotify@0.1.6
npm ERR! error installing watch-tree@0.1.0

npm ERR! inotify@0.1.6 install: `node-waf configure build`
npm ERR! `sh "-c" "node-waf configure build"` failed with 1
npm ERR!
npm ERR! Failed at the inotify@0.1.6 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!
npm ERR! System Linux 3.2.0-17-generic
npm ERR! command "node" "/usr/local/bin/npm" "install" "-g" "."
npm ERR! cwd /home/sjodal/dev/watch-tree
npm ERR! node -v v0.6.11
npm ERR! npm -v 1.1.1
npm ERR! code ELIFECYCLE
npm ERR! message inotify@0.1.6 install: `node-waf configure build`
npm ERR! message `sh "-c" "node-waf configure build"` failed with 1
npm ERR! errno {}
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! /home/jodal/dev/watch-tree/npm-debug.log
npm not ok
```

If I change the version of inotify in `packages.json` from 0.1.6 to 0.2.2 watch-tree can be installed successfully.

On a related note: npm seems to chose inotify 0.1.6 even though the version requirement is `~> 0.1.6`, and both 0.1.8 and 0.2.2 is released. Changing it to `~0.1.6`, like defined by http://npmjs.org/doc/json.html#Tilde-Version-Ranges doesn't help.