1

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
Community
  • 1
  • 1
Lai32290
  • 7,390
  • 18
  • 61
  • 89

1 Answers1

0
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

Darth
  • 1,517
  • 10
  • 17