Not sure from where it comes, but I updated couchbase node sdk from 2.1.2 to 2.1.4 and all my queries with include_docs(true) throw an error: SyntaxError: Unexpected end of input at parse (native)
With 2.1.2, everything was allright. Now with 2.1.4, include_docs(true) throws an error, include_docs(false) works as expected.
The case is, with a working connection:
var couchbase = require('couchbase'),
cluster = new couchbase.Cluster("couchbase://127.0.0.1"),
bucket = cluster.openBucket("mybucket"),
view = couchbase.ViewQuery;
console.log("this is ok until here");
bucket.query(
view.from('staff', 'list').include_docs(true),
function (err, staff) {
console.log("this is never called with include_docs true");
}
);
The staff/list view is extremely simple:
function (doc, meta) {
if (doc.type !== 'staff') {
return;
}
emit(doc.name, null);
}
What has changed between 2.1.2 and 2.1.4 ? And again everything went well with 2.1.2. I reverted back to this version and the problem disappeared.
Thanks!