QueryView TypeError Problem

Hi,

We’ve trying the new couchbase nodejs client (2.0.0) but we cannot use queryview.

In bucket.js, line 591 we have the follow:

if (query instanceof ViewQuery.Default) {

It’s failing, saying query isn’t of type ViewQuery.Default.

TypeError: First argument needs to be a ViewQuery or N1qlQuery.
at Bucket.query (/Users/casmeiron/Developer/repos/fittz-server/fittz-db/node_modules/couchbase/lib/bucket.js:600:11)

Now look how we’re creating the query object:

var ViewQuery = couchbase.ViewQuery;

var query = ViewQuery.from('user', 'by_id');

console.log(query instanceof ViewQuery.Default);

connection.query(query, function(err, results) {
    console.log("err", err);
    console.log("results", JSON.stringify(results));
});

The console.log showed above returns true. The same check is made inside and its failing.

We’re using nodejs version 0.10.30 and our package.json have the follow couchbase entry:
“couchbase”: “2.0.0-beta”,

Does anyone knows what’s going on?
Thanks in advance.