joyent/node — Issue #2238: The module installed by npm doesn't work (The ndns module doesn't work)
Author: NoAnyLove
Created: 2011-12-01 14:10:30+00:00
State: open

I use Win7 and node.js 0.6.3, and I use npm to install the ndns module. but it seems that the module completely doesn't work.

It shows like this :

D:\Networking\node.js\node_modules\ndns\lib>node
> require('./ndns')

D:\Networking\node.js\node_modules\ndns\lib\ndns.js:2339
function MessageQuestion (name, type, class)
^^^^^

D:\Networking\node.js\node_modules\ndns\lib\ndns.js:2339
function MessageQuestion (name, type, class)
^^^^^
...

Also, all of the scripts in examples directiory doesn't work, like this one:
D:\Networking\node.js\node_modules\ndns\examples>node dig.js

D:\Networking\node.js\node_modules\ndns\lib\ndns.js:2339
function MessageQuestion (name, type, class)
^^^^^

node.js:201
throw e; // process.nextTick error, or 'error' event on first tick
^
SyntaxError:
at Module._compile (module.js:427:25)
at Object..js (module.js:450:10)
at Module.load (module.js:351:31)
at Function._load (module.js:310:12)
at Module.require (module.js:357:17)
at require (module.js:368:17)
at Object. (D:\Networking\node.js\node_modules\ndns\examples\dig.
js:1:74)
at Module._compile (module.js:432:26)
at Object..js (module.js:450:10)
at Module.load (module.js:351:31)

Actually, the ndns.js installed by npm and the ndns.js hosted in https://github.com/jsjohnst/ndns are very different. But both of them don't work with node.js 0.6.3. I wish the modules provided by npm should be work correctly.