-
Notifications
You must be signed in to change notification settings - Fork 180
Description
Using the latest version from npm i'm experiencing this issue when I connect to a local db and I try to create a database.
Here the code used:
db.exists(function(error, exists){
if(error)
console.log(error);
else if (exists)
console.log("ok");
else{
db.create();
db.save('_design/test',{
all: {
map: function(doc){
if(doc.name) emit(doc.name, doc);
}
}
});Running this code once I receive this error:
/node_modules/cradle/lib/cradle/response.js:126
return Object.defineProperties(obj, descriptor);
^
TypeError: Object.defineProperties called on non-object
at Function.defineProperties (native)
at Object.extend (/node_modules/cradle/lib/cradle/response.js:126:19)
at Request._callback (/node_modules/cradle/lib/cradle.js:187:18)
at Request.callback (/node_modules/cradle/node_modules/request/main.js:119:22)
at Request. (native)
at Request.emit (events.js:70:17)
at Request. (/node_modules/cradle/node_modules/request/main.js:521:16)
at Request.emit (events.js:67:17)
at IncomingMessage. (/node_modules/cradle/node_modules/request/main.js:483:14)
at IncomingMessage.emit (events.js:88:20)