silentrob / superscript-websocket-demo

WebSocket example app
18 stars 9 forks source link

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

Open thadeuszlay opened 8 years ago

thadeuszlay commented 8 years ago

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)

bekatom commented 7 years ago

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

isbkch commented 7 years ago

oh man, this node madness needs to stop..

jenniferzhu commented 7 years ago

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

jenniferzhu commented 7 years ago

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

felipealfonsog commented 6 years ago

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