On Windows with NodeJs 5.5 and Npm 3.3.12 node serve errors with a cannot find bson module for mongodb.
C:\personal\AngularInAction\angello-express-api>node server
module.js:341
throw err;
^
Error: Cannot find module 'mongodb/node_modules/bson'
at Function.Module._resolveFilename (module.js:339:15)
at Function.Module._load (module.js:290:25)
at Module.require (module.js:367:17)
at require (internal/module.js:16:19)
at Object.<anonymous> (C:\personal\AngularInAction\angello-express-api\nod
modules\mongoose\lib\drivers\node-mongodb-native\objectid.js:8:16)
at Module._compile (module.js:413:34)
at Object.Module._extensions..js (module.js:422:10)
at Module.load (module.js:357:32)
at Function.Module._load (module.js:314:12)
at Module.require (module.js:367:17)
The fix is to update to mongodb version in package.json as follows. Note that kerbersos was added as npm warned that it was a peer dependency that needed to be installed.
"mongoose": "^3.8.15",
"mongoose-timestamp": "^0.3.0",
"mongoose-validator": "^1.0.0",
"kerberos": "^0.0.18",
On Windows with NodeJs 5.5 and Npm 3.3.12 node serve errors with a cannot find bson module for mongodb.
The fix is to update to mongodb version in package.json as follows. Note that kerbersos was added as npm warned that it was a peer dependency that needed to be installed.