Uploaded image for project: 'Node.js Driver'
  1. Node.js Driver
  2. NODE-659

Error: Cannot find module '../build/Release/bson

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Minor - P4 Minor - P4
    • None
    • Affects Version/s: 3.0.0
    • Component/s: MongoDB 3.2
    • Environment:
      Ubuntu 14.04, Node v5.5.0, Running on a Digital Ocean Droplet

      When installing the KeystoneJS project they use MongoDB as a dependency. I get this following error:

      trout@Development:~/keystone4$

      { [Error: Cannot find module '../build/Release/bson'] code: 'MODULE_NOT_FOUND' }

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

      I found a reference to this Stack Overflow discussion:
      http://stackoverflow.com/questions/28651028/cannot-find-module-build-release-bson-code-module-not-found-js-bson

      To fix the issue:
      cd ~/keystone4/node_modules/mongodb/node_modules/bson/ext/
      nano index.js

      change this line:
      bson = require('../build/Release/bson');
      to this line:
      bson = require('../browser_build/bson');

            Assignee:
            christkv Christian Amor Kvalheim
            Reporter:
            chris.troutner@gmail.com Chris Troutner
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: