js-bson: Failed to load c++ bson extension, using pure JS version on mongoose in Windows

506 views Asked by At

I'm trying create a desktop system using node-webkit, and using mongoose for handle my MongoDB

When I calling require('mongoose') function, this will return fallowing error, and nothing is happen in database:

js-bson: Failed to load c++ bson extension, using pure JS version

I tried create my database handle functions in a external test.js file, contain var mongoose = require('mongoose'), and execute it with node test.js in terminal, this is execute success, saved in database, returned insert row data.

Why this problem occur only is executed with node-webkit? How to can I fix this problem?

My environment is Windows 7, 64 bits


Posts where I tried:

  1. content="Problem with Mongoose/MongoJS on node-webkit 0.7.5 - Windows 7
  2. Cannot find module '../build/Release/bson'] code: 'MODULE_NOT_FOUND' } js-bson: Failed to load c++ bson extension, using pure JS version
1

There are 1 answers

0
Darth On
sed -i 's#bson = require('../build/Release/bson');#bson = require('../../../browser_build/bson');#g' node_modules/mongoose/node_modules/bson/node_modules/bson-ext/ext/index.js

From root catalog. Or find and correct that paths manually