how to install node-mongodb-native with nodejs in windows

Problem

I use nodejs and mongoose to save document to mongodb in windows in development, but I fail to connect to mongodb. My nodeunit test is always being blocked to the line mongoose.connect().

I found mongoose use node-mongodb-native. My question is:

  1. Do I need to do some special instructions to install node-mongodb-native in windows 7 (64-bit)?
  2. How to install node-mongodb-native in windows?
Problem courtesy of: Henry Leu

Solution

  1. Mongoose has a dependency on the npm package monogodb.
  2. If you look at the npm page for mongodb here, https://npmjs.org/package/mongodb, you'll find the homepage form the package is http://mongodb.github.com/node-mongodb-native/
  3. That page is node-mongodb-native.

So, there's nothing you need to do special to get it, as doing

npm install mongoose

is enough to install the native package.

Solution courtesy of: WiredPrairie

Discussion

There is currently no discussion for this recipe.

This recipe can be found in it's original form on Stack Over Flow.