P
P
pegas2018-07-15 19:07:57
JavaScript
pegas, 2018-07-15 19:07:57

How do I connect to a MongoDB database?

Do not tell me what's wrong with the mongoose plugin? I'm trying to include the require('mongoose'); module in the executable file. and immediately an error is thrown.

{ Error: Cannot find module '../build/Release/bson'
    at Function.Module._resolveFilename (module.js:555:15)
    at Function.Module._load (module.js:482:25)
    at Module.require (module.js:604:17)
    at require (internal/module.js:11:18)
    at Object.<anonymous> (C:\Users\Aquarius\Desktop\Node\public\Meadowlark\node
_modules\bson\ext\index.js:15:10)
    at Module._compile (module.js:660:30)
    at Object.Module._extensions..js (module.js:671:10)
    at Module.load (module.js:573:32)
    at tryModuleLoad (module.js:513:12)
    at Function.Module._load (module.js:505:3) code: 'MODULE_NOT_FOUND' }
js-bson: Failed to load c++ bson extension, using pure JS version

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question