josephg / ShareJS

Collaborative editing in any app

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Server dies when missing views in CouchDB

luman75 opened this issue · comments

There is required view in CouchDB for quick operations' search.
Unfortunately if the view is not created the system throws an exception and dies.

This is maybe not very big issue for production environment where easily the required view can be created but for Continous Integration it's a pain in the neck to prepare the view before the system starts.



/node_modules/share/src/server/db/couchdb.js:107
            for (_i = 0, _len = _ref.length; _i < _len; _i++) {
                                    ^
TypeError: Cannot read property 'length' of undefined
    at /node_modules/share/src/server/db/couchdb.js:107:37
    at Request.module.exports.getOps [as _callback] (/node_modules/share/src/server/db/couchdb.js:115:13)
    at Request.init.self.callback (/node_modules/request/index.js:148:22)
    at Request.EventEmitter.emit (events.js:99:17)
    at Request.onResponse (/node_modules/request/index.js:876:14)
    at Request.EventEmitter.emit (events.js:126:20)
    at IncomingMessage.Request.onResponse.buffer (/node_modules/request/index.js:827:12)
    at IncomingMessage.EventEmitter.emit (events.js:126:20)
    at IncomingMessage._emitEnd (http.js:366:10)
    at HTTPParser.parserOnMessageComplete [as onMessageComplete] (http.js:149:23)
    at Socket.socketOnData [as ondata] (http.js:1485:20)
    at TCP.onread (net.js:404:27)