Skip to content
This repository was archived by the owner on Jul 15, 2018. It is now read-only.
This repository was archived by the owner on Jul 15, 2018. It is now read-only.

Error at Object.<anonymous> #28

@dcsan

Description

@dcsan

I tried a very simple script to use this without common-node, and using Fibers, but hit a problem right away;

script:

var Fiber = require('fibers');
let Server = require('mongo-sync').Server;
let server = new Server('127.0.0.1:3001');

const testDb = () => {
  Fiber(function() {
    var result = server.db('Meteor').getCollection('Topics').find().toArray();
    console.log('db result');
  }).run();
};

testDb();

gives the error below:

{ [Error: Cannot find module '../build/Release/bson'] code: 'MODULE_NOT_FOUND' }
js-bson: Failed to load c++ bson extension, using pure JS version

I assume this doesn't matter as i've often seen this problem.

/Users/dc/dev/rikai/chatrobot/tools/node_modules/mongodb/lib/utils.js:97
    process.nextTick(function() { throw err; });
                                  ^

Error: Error
    at Object.<anonymous> (/Users/dc/dev/rikai/chatrobot/tools/node_modules/mongodb-core/lib/error.js:42:24)
    at Module._compile (module.js:398:26)
    at Object.Module._extensions..js (module.js:405:10)
    at Module.load (module.js:344:32)
    at Function.Module._load (module.js:301:12)
    at Module.require (module.js:354:17)
    at require (internal/module.js:12:17)
    at Object.<anonymous> (/Users/dc/dev/rikai/chatrobot/tools/node_modules/mongodb-core/index.js:2:17)
    at Module._compile (module.js:398:26)
    at Object.Module._extensions..js (module.js:405:10)
Followed by:
    at Cursor.<anonymous> (/Users/dc/dev/rikai/chatrobot/tools/node_modules/mongo-sync/lib/mongo-sync.js:27:13)
    at Cursor.toArray (/Users/dc/dev/rikai/chatrobot/tools/node_modules/mongo-sync/lib/mongo-sync.js:203:20)
    at /Users/dc/dev/rikai/chatrobot/tools/watch-rebot.js:34:69

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions