-
-
Notifications
You must be signed in to change notification settings - Fork 3.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
js-bson: Failed to load c++ bson extension, using pure JS version #2285
Comments
Same problem |
Same issue here; backing off to 3.8.15 resolves the issue on OSX under 0.11.13. |
Yeah I've noticed this too. Your code will still work, just you may have worse performance. I'll fix this for next version. |
ok |
Same problem |
Same here. Will stay 3.8.15 till changes. |
Ok.... Same problem! |
Any update on this? |
I had the same problem (mongoose 3.8.19 and node 0.10.33). I've just resolve it after noticing that npm install (and npm update) compile the Debug version of bson but index.js (placed in node_modules/mongoose/node_modules/mongodb/node_modules/bson/ext/index.js in my case) require the Release version. As you can see in this section of the code: 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('../build/Release/bson');
}
} catch(err) {
// Attempt to load the release bson version
try {
bson = require('../build/Release/bson');
} catch (err) {
console.error("js-bson: Failed to load c++ bson extension, using pure JS version");
bson = require('../lib/bson/bson');
}
} I went inside the build directory and simply compile bson with the following command make BUILDTYPE=Release all Somewhere in the repository it has been changed from Release to Debug, but I didn't search into it. |
@Gas3 what version of Also, I've managed to repro this - looks like a clean |
npm 2.1.7 on Os X 10.9.5 |
Can you try a clean npm install - kill off node_modules and then |
+1 |
@brunobatista try |
Same problem: |
Same problem here: Tried 'rm -rf node_modules; npm cache clean; npm install' with no luck. |
Same issue was on Ubuntu 14.04. My steps:
But I see error on Windows 8.1. This "require" throws error: bson = require('./win32/ia32/bson');
File bson.node exists |
I'm getting the same error with Node v4.2.4, Mongo v2.6.11, OSX 10.11.2
When I run my app I get:
I wonder if this is an OSX issue because I don't have any problems on Linux. Could this have something to do with the gcc, the default Clang compiler installed by XCode.
|
@vkarpov15 is right, update mongoose to 4.4.5 fix this problem |
@vkarpov15, Am I correct in assuming this issue is caused by running newer version of Mongoose with older versions of MongoDB — version 2.X for instance? |
No, the mongodb version has nothing to do with it. |
[FIXED]I also had this problem OS: Windows 10 i just simply set the python path
and reinstall the mongoose
and it worked. |
@nityanarayan44 It worked for me |
@mgol I went to
this worked for me: |
Also worked for me the @nityanarayan44 solution |
Same problem.My version is node 2.15, platform Centos |
There's no such version of Node as 2.15 so I think you mean io.js. And Michał Gołębiowski |
@arefm Thx,it worked for me about updating the version 3.8.23.What's more,solveing another problem: length is undefined and so on. |
@mgol He was talking about |
@mnpenner I believe its 3.8.8 |
@jwerre I said npm2. Some of us are stuck on npm 2 because 3 has a whole host of different problems. |
@mgol Sorry, the npm version is 2.15, not the node. |
@mnpenner Yes,you are a smart man! |
When using with Keystone this is what worked for me to get past that error: add the following to my
then
finally
Now I don't get the error. |
@aventurella I hit the same rock when I am trying keystone today, thanks for your solution. but now we get some extraneous errors and some missing errors, is this ok? |
@tomwang1013 updating mongoose solved the problem, but somehow my app is not connecting to the DB..... |
In our case, the reason that the c++ version bson was not found was because we were behind a corporate proxy and something in the BSON build process needs to reach out to fetch files. When we looked in node_modules/bson/builderror.log, we saw an error like this:
Which suggested that the proxy might be the issue. Sorry for reawakening comments on this, but I wanted to post this for anyone else that hits this in the future since this thread was very helpful in solving our issue. |
@aventurella thanks for your fix, it worked! Makes me feel a little funny though. |
I have this issue on Windows 10, can't run a "basic" example either... is supposed that the installation files should provide all the stuff to run something, or at least have the instructions to do so... |
The solution of @lutaoact is for me the most indicated if you use Windows. I tried with it and it solves my issue. |
If you're running into this issue, you're using an extremely old version of Mongoose. Please upgrade to Mongoose >= 5 👍 |
I clicked on
Fork
, cloned the repo and I attached this module to my project. I get this errornodejs v0.11.13
, latestosx
. It looks that the problem is with themongodb
module (works with bson 0.2.15).The text was updated successfully, but these errors were encountered: