yfinkelstein/node-zookeeper — comment on commit 980a313f6e7dc12b8896087459b36b61180dd5f0
File: src/node-zk.cpp line 348
By ddopson:

Node v0.6.x (actually, v0.5.x) removed the native EventEmitter class. This broke, well, pretty much all native modules. The only documentation on writing native modules was a link to node-postgres as an example, and at the time I checked (v0.6.2 or so), THAT module was still broken.

The common solution to the issue was to move event emitting into Javascript, adding a wrapper layer around the native module. There were a couple of other things that made this important / useful:
* the node-waf building changed the default build dir from "build/default" to "build/Release". Thus, the package.json had no way to reference the native module safely for the "main" property. In JS land, we can do a try/catch to attempt the new location and fallback to the old location, abstracting the problem away from module users. This too has precedence in other native modules.