node.js + express error:无法读取未定义的属性'url'

我对Node.js相当陌生,安装它来试用DrupalChat(v7dev)模块。 我相信这个问题是node.js或express,因为我超越了聊天模块的设置加载阶段。 在尝试启动聊天服务器时,我遇到以下输出

Extension loaded: drupalchat_nodejs.server.extension.js Started http server. info - socket.io started node.js:201 throw e; // process.nextTick error, or 'error' event on first tick ^ TypeError: Cannot read property 'url' of undefined at Function.handle (/usr/local/lib/node_modules/npm/node_modules/express/node_modules/connect/lib/proto.js:105:18) at Server.app (/usr/local/lib/node_modules/npm/node_modules/express/node_modules/connect/lib/connect.js:60:31) at Server.serverListening (/usr/local/lib/node_modules/npm/node_modules/socket.io/node_modules/policyfile/lib/server.js:136:16) at Server.g (events.js:154:14) at Server.emit (events.js:64:17) at Array.1 (net.js:710:10) at EventEmitter._tickCallback (node.js:192:40) 

我记得当快递安装,它给了一个像“….错误['networking]应该可能是错误['URL']”(我不记得前缀)

那么服务器是试图读取一个(API?)variables“url”,而是当前的“web”?

我有所有的模块是最新的,是我应该降级? 或者有什么办法解决这个使用另一个模块?

编辑:行201是最后一行(删除authenticatedClients [authData.authToken];)…我只是添加到整个函数的适当上下文

 var authenticateClientCallback = function (error, response, body) { if (error) { console.log("Error with authenticate client request:", error); return; } if (response.statusCode == 404) { if (settings.debug) { console.log('Backend authentication url not found, full response info:', response); } else { console.log('Backend authentication url not found.'); } return; } var authData = false; try { authData = JSON.parse(body); } catch (exception) { console.log('Failed to parse authentication message:', exception); if (settings.debug) { console.log('Failed message string: ' + body); } return; } if (!checkServiceKey(authData.serviceKey)) { console.log('Invalid service key "', authData.serviceKey, '"'); return; } if (authData.nodejsValidAuthToken) { if (settings.debug) { console.log('Valid login for uid "', authData.uid, '"'); } setupClientConnection(authData.clientId, authData, authData.contentTokens); authenticatedClients[authData.authToken] = authData; } else { console.log('Invalid login for uid "', authData.uid, '"'); delete authenticatedClients[authData.authToken]; } } 

按照要求,

drupal的v7聊天模块不稳定。 你不应该在生产中使用它。

检查错误: http : //drupal.org/project/issues/drupalchat? status= All& categories= All

检查论坛: http : //drupalchat7.botskool.co.in/? q= forum

还在寻找一位新的维护者:“新维护者想要 – 如果你有兴趣请ping beejeebus!”

Per @ thesnufkin的post,看起来像是目前拉下的底层快递版本并不稳定。 回滚到2.5.9,你应该很好走:

npm uninstall express npm install express@2.5.9

nodejs模块有这个问题,所以我不认为它具体涉及到drupalchat服务器。 这是这个问题: http : //drupal.org/node/1537702

目前正在开发将node.js用作DrupalChat后端的选项。 这也取决于你下载DrupalChat的时间(date),因为每天更新开发代码,如果提交了新的代码。

请在此链接提出相同的问题 – http://drupal.org/project/issues/drupalchat?status=All&categories=All

谢谢,

darklrd