Skip to content
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

node server.js #33

Open
abebraham opened this issue Aug 8, 2016 · 2 comments
Open

node server.js #33

abebraham opened this issue Aug 8, 2016 · 2 comments

Comments

@abebraham
Copy link

I get the following error after running node server.js . . . Any ideas why?

Any help would be greatly appreciated!

{ [Error: Cannot find module '../build/Release/bson'] code: 'MODULE_NOT_FOUND' }
js-bson: Failed to load c++ bson extension, using pure JS version
The magic happens on port 8080
/Users/AbeBook/test_node/easy-node-authentication/node_modules/mongoose/node_modules/mongodb/lib/mongodb/connection/base.js:246
        throw message;      
        ^

MongoError: Authentication failed.
    at Object.toError (/Users/AbeBook/test_node/easy-node-authentication/node_modules/mongoose/node_modules/mongodb/lib/mongodb/utils.js:114:11)
    at /Users/AbeBook/test_node/easy-node-authentication/node_modules/mongoose/node_modules/mongodb/lib/mongodb/db.js:1196:31
    at /Users/AbeBook/test_node/easy-node-authentication/node_modules/mongoose/node_modules/mongodb/lib/mongodb/db.js:1905:9
    at Server.Base._callHandler (/Users/AbeBook/test_node/easy-node-authentication/node_modules/mongoose/node_modules/mongodb/lib/mongodb/connection/base.js:453:41)
    at /Users/AbeBook/test_node/easy-node-authentication/node_modules/mongoose/node_modules/mongodb/lib/mongodb/connection/server.js:488:18
    at MongoReply.parseBody (/Users/AbeBook/test_node/easy-node-authentication/node_modules/mongoose/node_modules/mongodb/lib/mongodb/responses/mongo_reply.js:68:5)
    at null.<anonymous> (/Users/AbeBook/test_node/easy-node-authentication/node_modules/mongoose/node_modules/mongodb/lib/mongodb/connection/server.js:446:20)
    at emitOne (events.js:77:13)
    at emit (events.js:169:7)
    at null.<anonymous> (/Users/AbeBook/test_node/easy-node-authentication/node_modules/mongoose/node_modules/mongodb/lib/mongodb/connection/connection_pool.js:207:13)
    at emitTwo (events.js:87:13)
    at emit (events.js:172:7)
    at Socket.<anonymous> (/Users/AbeBook/test_node/easy-node-authentication/node_modules/mongoose/node_modules/mongodb/lib/mongodb/connection/connection.js:440:22)
    at emitOne (events.js:77:13)
    at Socket.emit (events.js:169:7)
    at readableAddChunk (_stream_readable.js:153:18)
@CallumBrankin
Copy link

find in npm module mongodb ..node_modules\mongodb\node_modules\bson\ext\index.js

and change path to js version in catch block

bson = require('../build/Release/bson');
to

bson = require('../browser_build/bson');

@0x1211
Copy link
Contributor

0x1211 commented Sep 30, 2016

@abebraham @CallumBrankin See #30 which was fixed in #38

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants