我試圖測試couchnode「Couchbase Node.js客戶端」V2.0.0,但它不起作用。錯誤從Node.js使用Couchnode模塊v.2.0.0連接到CouchBase
我有一個couchbase用2桶安裝:默認和啤酒樣品
我按照自述:couchnode
$ npm install couchbase
在解說的示例工作正常,並顯示正確{名稱: Frank}
但是當我啓動example.js時,它不起作用
我試着config.json爲空並配置爲
{ "bucket":"default", "host":"127.0.0.1:8091"}
$ node example.js
/home/clodio/node/node_modules/couchbase/example.js:16
bucket = new couchbase.Connection(config, function(err) {
^
TypeError: undefined is not a function
at Object.<anonymous> (/home/clodio/node/node_modules/couchbase/example.js:16:10)
at Module._compile (module.js:456:26)
at Object.Module._extensions..js (module.js:474:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)
at Function.Module.runMain (module.js:497:10)
at startup (node.js:119:16)
at node.js:906:3
怎麼了?
注:我讀了Error Connecting to CouchBase from Node.js using Couchnode module v.1.2.4但它是不一樣的問題
在V2中,實際上有很多變化,我使用的示例項目確實使用了新方法 – clood 2014-10-22 07:19:44