A
A
Abc Edc2015-01-12 21:48:40
Node.js
Abc Edc, 2015-01-12 21:48:40

What is this crazy error in node js - js-bson: Failed to load c++?

I wanted to learn a new one called. Executed the script for checking the connection to the database

var MongoClient = require('mongodb').MongoClient
    , assert = require('assert');

// Connection URL
var url = 'mongodb://localhost:27017/party';
// Use connect method to connect to the Server
MongoClient.connect(url, function(err, db) {
    assert.equal(null, err);
    console.log("Connected correctly to server");

    db.close();
});

As a result, it throws an error
{ [Error: Cannot find module '../build/Release/bson'] code: 'MODULE_NOT_FOUND' }
js-bson: Failed to load c++ bson extension, using pure JS version
and then, as it were, executes. How is this to be understood

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Sergey, 2015-01-12
@gleber1

Failed to load c++ bson extension, using pure JS version

That's how to understand. Your module complains that you do not have a fast and convenient module for working with BSON written in pluses installed and therefore it will use a slow JS implementation.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question