我是新手,我正在编写一个基于Node.js的简单程序。 一切都很好,直到我添加这一行:
process.addListener('SIGINT', function(){ console.log( 'Sigint test.' ); } );
运行:Node sample.js
我收到了以下信息:
node.js:203
throw e; // process.nextTick error, or 'error' event on first tick
^
Error: No such module
at EventEmitter.<anonymous> (node.js:361:27)
at Object.<anonymous> (D:\Nodejs\MySample\sample.js:13:9)
at Module._compile (module.js:432:26)
at Object..js (module.js:450:10)
at Module.load (module.js:351:31)
at Function._load (module.js:310:12)
at Array.<anonymous> (module.js:470:10)
at EventEmitter._tickCallback (node.js:195:26)
环境:
Windows XP sp2 Node.js 0.5.9 for Windows
请帮助我......