N
N
Nikita Kit2016-12-23 12:08:41
JavaScript
Nikita Kit, 2016-12-23 12:08:41

How to make mongoDB bson module friends with Keystone JS?

If someone hears about keystone for the first time - in short, this is a CMS, or rather a yeoman generator, like expressjs, only more developed. If anyone is interested - keystonejs.com
After running keystone node returns an error:

{ [Error: Cannot find module '../build/Release/bson'] code: 'MODULE_NOT_FOUND' }
js-bson: Failed to load c++ bson extension, using pure JS version

Despite the fact that the monga is running
, they write on stackoverflow, they say you need to change the path. They write that mongoose helped someone. Didn't help me. I didn't find the exact solution. In which module to change the path, I did not understand. Ideally, you would learn to find a file with some sort of cancer, or rather a line in which an error occurs.
Thank you all in advance for your answers, all with the upcoming
UPD:
I found the solution myself, in the Mongi bug thread.
If anyone needs it:
sudo npm i node-gyp -g
rm -rf node_modules
npm clear cache
npm install (adding the required compatible versions of mongodb and mongoose to package.json)

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