Unable to install Mongoose on Windows Server 2008 R2 SP1
Problem
When tried `npm install` on Windows Server 2008 R2 SP1, it gives the following messages C:\Users\someFolder>npm install mongoose- > kerberos@0.0.3 install C:\Users\SomeFolder\node_modules\mongoose\node_modules\mongodb\node_modules\kerberos > (node-gyp rebuild 2> builderror.log) || (exit 0) npm WARN optional dep failed, continuing kerberos@0.0.3 npm WARN optional dep failed, continuing kerberos@0.0.3 mongoose@3.8.8 node_modules\mongoose โโโ regexp-clone@0.0.1 โโโ sliced@0.0.5 โโโ muri@0.3.1 โโโ hooks@0.2.1 โโโ mpath@0.1.1 โโโ mpromise@0.4.3 โโโ ms@0.1.0 โโโ mquery@0.5.3 (debug@0.7.4) โโโ mongodb@1.3.23 > bson@0.2.5 install C:\Users\SomeFolder\node_modules\mongoose\node_modules\mongodb\node_modules\bson > (node-gyp rebuild 2> builderror.log) || (exit 0) When I run the app, I receive the following error C:\Users\Somefolder>node app.js module.js:340 throw err; ^ Error: Cannot find module 'bson' at Function.Module._resolveFilename (module.js:338:15) at Function.Module._load (module.js:280:25) at Module.require (module.js:364:17) at require (module.js:380:17) at Object.<anonymous> (C:\Users\Somefolder\node_mod ules\agenda\node_modules\mongoskin\node_modules\mongodb\lib\mongodb\collection.j s:10:16) at Module._compile (module.js:456:26) at Object.Module._extensions..js (module.js:474:10) at Module.load (module.js:356:32) at Function.Module._load (module.js:312:12) at Module.require (module.js:364:17)
Error Output
error C:\Users\Somefolder>node app.js
Unverified for your environment
Select your OS to check compatibility.
1 Fix
Solution: Unable to install Mongoose on Windows Server 2008 R2 SP1
Hmm looks like install of the underlying bson module failed. Its odd though, because the bson module, in theory, falls back to a JS-only implementation if the C++ extension fails to compile. The kerberos failure is not really a problem (unless you want to use Kerberos SSPI with MongoDB that is). Can you tell me which version of node and npm you're using, and what version of mongoose you're trying
Trust Score
1 verification
- 1
Hmm looks like install of the underlying bson module failed. Its odd though, bec
Hmm looks like install of the underlying bson module failed. Its odd though, because the bson module, in theory, falls back to a JS-only implementation if the C++ extension fails to compile. The kerberos failure is not really a problem (unless you want to use Kerberos SSPI with MongoDB that is). Can you tell me which version of node and npm you're using, and what version of mongoose you're trying to install?
Validation
Resolved in Automattic/mongoose GitHub issue #2362. Community reactions: 0 upvotes.
Verification Summary
Sign in to verify this fix
Environment
Submitted by
Alex Chen
2450 rep