superscript-websocket-demo icon indicating copy to clipboard operation
superscript-websocket-demo copied to clipboard

server doesn't start? Cannot find module '../build/Release/bson'] code: 'MODULE_NOT_FOUND' }

Open thadeuszlay opened this issue 9 years ago • 5 comments
trafficstars

I followed the steps #1 till #3. But when I executed

node server.js

It would throw an error with the message:

{ [Error: Cannot find module '../build/Release/bson'] code: 'MODULE_NOT_FOUND' } js-bson: Failed to load c++ bson extension, using pure JS version events.js:141 throw er; // Unhandled 'error' event ^

Error: failed to connect to [localhost:27017] at null. (/home/think/dev/superscript/node_modules/mongodb/lib/mongodb/connection/server.js:555:25) at emitThree (events.js:97:13) at emit (events.js:175:7) at null. (/home/think/dev/superscript/node_modules/mongodb/lib/mongodb/connection/connection_pool.js:150:15) at emitTwo (events.js:87:13) at emit (events.js:172:7) at Socket. (/home/think/dev/superscript/node_modules/mongodb/lib/mongodb/connection/connection.js:534:10) at emitOne (events.js:77:13) at Socket.emit (events.js:169:7) at emitErrorNT (net.js:1255:8) at nextTickCallbackWith2Args (node.js:474:9) at process._tickCallback (node.js:388:17)

thadeuszlay avatar Oct 03 '16 13:10 thadeuszlay

I had similar issue After update node to v7.2.0 & mongoose "mongoose": "~4.4" now it works

bekatom avatar Nov 24 '16 22:11 bekatom

oh man, this node madness needs to stop..

isbkch avatar Dec 14 '16 01:12 isbkch

@btomashvili It does not work with the updates.... It is crazy

jenniferzhu avatar Sep 27 '17 21:09 jenniferzhu

I did a lot of research and this method solved this issue: https://stackoverflow.com/questions/28651028/cannot-find-module-build-release-bson-code-module-not-found-js-bson

jenniferzhu avatar Sep 29 '17 22:09 jenniferzhu

it's necessary to modify the module .... mondodb

felipealfonsog avatar Jul 04 '18 04:07 felipealfonsog