jdarling / MongoMQ

MongoMQ is a messaging queue built on top of Node.js and MongoDB's tailable cursors.
MIT License
90 stars 20 forks source link

Undefined BSON property #1

Closed justinwalsh closed 12 years ago

justinwalsh commented 12 years ago

After doing a fresh npm install of MongoMQ and using node 0.6.8, I am receiving the following error out of the mongodb dependency when trying to start the queue:

/APP/node_modules/mongomq/node_modules/mongodb/lib/mongodb/index.js:50
exports.BSON = require('bson').BSONPure.BSON;
                                       ^
TypeError: Cannot read property 'BSON' of undefined

Is this just a bad package dep?

jdarling commented 12 years ago

I'll have to find a machine with Node 6.8 on it, my current machines have been upgraded to 8.2 and don't have this issue. I have a dev box at work with 6.8 I will check it on.

jdarling commented 12 years ago

This seems to be an issue with using the latest Mongo-Native-Driver with 6.x. Unfortunately there isn't much I can do about that since to use Tailed Cursors I have to use the latest version of the driver. The only "resolution" would be to upgrade to node 8.2+ or rewrite pretty much the entire core to be compatible (something I don't have the time or interest in doing).

I'll update the npm package to enforce Node 8.2+ in the next release.