jaydata odata-server newsreader样本抛出没有方法' basicAuth'例外

时间:2014-08-18 15:02:52

标签: node.js odata jaydata

我没有让odata-server在我的机器上工作(Windows 8.1,nodejs 0.10.30,mongo 2.4.8)。还试过干净的Ubuntu安装,同样的问题。 Repro场景:

  • 创建目录
  • npm install odata-server
  • cd node_modules / odata-server
  • node newsreader.js

这给出了以下输出:

Should be empty: []
Test data upload successful. 100 items inserted.
Starting NewsReader OData server.

C:\Projects\odata\node_modules\odata-server\node_modules\mongodb\lib\mongodb\connection\base.js:245
throw message;
^
TypeError: Object function createServer() {
function app(req, res, next){ app.handle(req, res, next); }
merge(app, proto);
merge(app, EventEmitter.prototype);
app.route = '/';
app.stack = [];
return app;
} has no method 'basicAuth'
at C:\Projects\odata\node_modules\odata-server\newsreader.js:14:25
at defer.<anonymous> (C:\Projects\odata\node_modules\odata-server\newsreader\context.js:123:13)
at Object.cbWrapper.success (C:\Projects\odata\node_modules\odata-server\node_modules\jaydata\lib\JayDataModules\qDeferred.js:25:38)
at NewsContext.$data.Class.define._applyTransaction (C:\Projects\odata\node_modules\odata-server\node_modules\jaydata\lib\Types\EntityContext.js:224:16)
at readyFn (C:\Projects\odata\node_modules\odata-server\node_modules\jaydata\lib\Types\EntityContext.js:1430:17)
at NewsContext.$data.Class.define._postProcessSavedItems (C:\Projects\odata\node_modules\odata-server\node_modules\jaydata\lib\Types\EntityContext.js:1473:14)
at Object.innerCallback.success (C:\Projects\odata\node_modules\odata-server\node_modules\jaydata\lib\Types\EntityContext.js:1154:29)
at Object.self._saveCollections.success (C:\Projects\odata\node_modules\odata-server\node_modules\jaydata\lib\Types\StorageProviders\mongoDB\mongoDBStorageProvider.js:653:38)
at readyFn (C:\Projects\odata\node_modules\odata-server\node_modules\jaydata\lib\Types\StorageProviders\mongoDB\mongoDBStorageProvider.js:566:22)
at esFn (C:\Projects\odata\node_modules\odata-server\node_modules\jaydata\lib\Types\StorageProviders\mongoDB\mongoDBStorageProvider.js:590:19)

我错过了什么?

1 个答案:

答案 0 :(得分:2)

不再使用basicAuth(以及其他中间件)连接,并已移至外部中间件存储库。

可以找到here