Local Install Fails
The last step in the installation sequence:
node keystone
results in Cannot find module '../build/Release/bson'.
Attempting to start with node keystone.js or npm start produces same error. Page fails to load on localhost:3000.
Any help would be greatly appreciated!
Full stack trace:
{ Error: Cannot find module '../build/Release/bson' at Function.Module._resolveFilename (module.js:470:15) at Function.Module._load (module.js:418:25) at Module.require (module.js:498:17) at require (internal/module.js:20:19) at Object.<anonymous> (/Users/jpearnest/Apps/my-react-site/node_modules/bson/ext/index.js:15:10) at Module._compile (module.js:571:32) at Object.Module._extensions..js (module.js:580:10) at Module.load (module.js:488:32) at tryModuleLoad (module.js:447:12) at Function.Module._load (module.js:439:3) at Module.require (module.js:498:17) at require (internal/module.js:20:19) at Object.<anonymous> (/Users/jpearnest/Apps/my-react-site/node_modules/bson/lib/bson/index.js:3:24) at Module._compile (module.js:571:32) at Object.Module._extensions..js (module.js:580:10) at Module.load (module.js:488:32) code: 'MODULE_NOT_FOUND' } js-bson: Failed to load c++ bson extension, using pure JS version
+1 same issue here
Find [YOUR_PROJECT]/node_modules\bson\ext\index.js
and change path on 10th line
bson = require('../build/Release/bson'); to bson = require('bson');
takes care of the error but keystone wouldn't init...
You manage to fix?
Having same problem.
All the steps for installing MongoDB aren't there - you'll need to drop this into your terminal:
mkdir -p /data/db
and then set permissions:
sudo chmod 0755 /data/db
sudo chown $USER /data/db
Then you can navigate back into your project folder and run:
mongod
because keystone expects to find mongoDB running on localhost in order to initialise (according to getting started docs). Open a new terminal window and 'node keystone' will work.
The documentation needs updating (which they say they're in the middle of doing here: http://keystonejs.com/docs/getting-started/). I might submit a pull request to update the documentation on this repository if no one has any corrections to my suggestions above?
Hi , I did the instructions but keystone still do not want to init.
@youbihi I replied in the slack channel.
$npm audit fix or $npm audit fix --force fixed the bson problem for me