I am getting the below error:
{ [Error: Cannot find module \'../build/Release/bson\'] code: \'MODULE_NOT_FOUND\' }
js-bson: Failed to load c++ bson extens
find in npm module mongodb ..node_modules\mongodb\node_modules\bson\ext\index.js
and change path to js version in catch block
bson = require('../build/Release/bson');
to bson = require('../browser_build/bson');
try {
// Load the precompiled win32 binary
if(process.platform == "win32" && process.arch == "x64") {
bson = require('./win32/x64/bson');
} else if(process.platform == "win32" && process.arch == "ia32") {
bson = require('./win32/ia32/bson');
} else {
bson = require('../browser_build/bson');
}
} catch(err) {
// Attempt to load the release bson version
try {
bson = require('../browser_build/bson');
} catch (err) {
console.dir(err)
console.error("js-bson: Failed to load c++ bson extension, using pure JS version");
bson = require('../lib/bson/bson');
}
}