josephg / josephg/ShareJS

Server dies when missing views in CouchDB

Open
#218 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
5k
Forks
454
PR merge metrics
No merged PRs in 30d

Description

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)
```

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.