olegp / mongo-sync

Synchronous MongoDB driver for Common Node
58 stars 13 forks source link

Does it require Fibers #22

Open sameer-b opened 10 years ago

sameer-b commented 10 years ago

Fibers is not listed as a dependency. I'm getting the following message.

Error: Cannot find module 'fibers' at Function.Module._resolveFilename (module.js:338:15) at Function.Module._load (module.js:280:25) at Module.require (module.js:364:17) at require (module.js:380:17) at Object. (/node_modules/mongo-sync/lib/mongo-sync.js:1:91) 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 Module.require (module.js:364:17)

jugalkishor-sujal commented 10 years ago

install fiber

jugalkishor-sujal commented 10 years ago

var Server = require("mongo-sync").Server; var Fiber = require('fibers'); var server = new Server('127.0.0.1'); Fiber(function () { // set up goes here ... var result = server.db("snow_white").getCollection("settings").find().toArray(); console.log(result); }).run();