events.js:85扔呃; //未处理“错误”事件

我试图设置一个推特应用程序,我目前被困在以下错误:

$ node twitter.js events.js:85 throw er; // Unhandled 'error' event ^ SyntaxError: Unexpected token U at Object.parse (native) at EventEmitter.receive (/Users/user/Documents/twitter/node_modules/twitter/lib/parser.js:40:21) at IncomingMessage.<anonymous> (/Users/user/Documents/twitter/node_modules/twitter/lib/twitter.js:207:14) at IncomingMessage.emit (events.js:129:20) at readableAddChunk (_stream_readable.js:163:16) at IncomingMessage.Readable.push (_stream_readable.js:126:10) at HTTPParser.parserOnBody (_http_common.js:132:22) at TLSSocket.socketOnData (_http_client.js:317:20) at TLSSocket.emit (events.js:107:17) at readableAddChunk (_stream_readable.js:163:16) MBPro:twitter $ 

Synthax错误? 我不明白。

Twitter.js代码:

 var tweet = require('twitter'), twitter = new tweet({ consumer_key: '', consumer_secret: '', access_token_key: '', access_token_secret: '' }); var count = 0, util = require('util'); twitter.stream('filter', {track: 'test'}, function(stream){ stream.on('data', function(data) { console.log(util.inspect(data)); stream.destroy(); process.exit(0); }); }); 

       

网上收集的解决方案 "events.js:85扔呃; //未处理“错误”事件"