0

I am new to couchdb and i am implementing it now to see weather to use it for new project will be good or not. so i id search for that i am using the following driver to operate it with Node.js https://github.com/apache/couchdb-nano

here just trying to do CRUD operation so i just write this code to test delete document.

var express = require('express');
var router = express.Router();
var nano = require('nano')('http://127.0.0.8:5984');
var docTest = nano.use('test');
nano.db.destroy("test",function(err,data){
  console.log(err);
});)
nano.db.comapact("test",function(err,data){
  console.log(err);
});

that gives me a following error any idea how to solve it?

TypeError: nano.db.comapact is not a function

Jonathan Hall
  • 75,165
  • 16
  • 143
  • 189
Nisarg Desai
  • 361
  • 3
  • 16
  • 2
    `comapact` is a typo, it should be `compact` – Dominic Barnes May 26 '17 at 23:38
  • @DominicBarnes thank and sorry for late replay. actually spelling mistake was not problem somehow nano.db was showing undefined in debugging it was failing with credential. and still you was right it was my typing mistake. – Nisarg Desai May 29 '17 at 13:13
  • Strongly recommend trying out PouchDB to communicate with CouchDB. PouchDB can handle on-line/off-line syncing of databases, and much more. – Megidd Jun 08 '17 at 11:52
  • @user4838962 i did look for them and it did solve destroy problem but with that replication time conflict problem was raised even there was not concurrent jobs taken. – Nisarg Desai Jun 10 '17 at 19:28
  • @NisargDesai how did you resolve this ? – ganesh Mar 15 '19 at 11:06
  • @ganesh nano at first i did installed globally and that was giving me error i did install that package in folder path so undefined problem resolved. the conflict problem i don't remember now how i did solved as it was 2 years ago. – Nisarg Desai Mar 26 '19 at 13:37

0 Answers0