Skip to content
This repository has been archived by the owner on Nov 24, 2021. It is now read-only.

Local Install Fails #7

Open
jpke opened this issue Apr 28, 2017 · 8 comments
Open

Local Install Fails #7

jpke opened this issue Apr 28, 2017 · 8 comments

Comments

@jpke
Copy link

jpke commented Apr 28, 2017

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

@charles-philippe
Copy link

+1 same issue here

@charles-philippe
Copy link

Find [YOUR_PROJECT]/node_modules\bson\ext\index.js

and change path on 10th line

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

@charles-philippe
Copy link

takes care of the error but keystone wouldn't init...

@waldinho
Copy link

waldinho commented Jun 1, 2017

You manage to fix?

Having same problem.

@readeral
Copy link

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?

@youbihi
Copy link

youbihi commented Oct 14, 2018

Hi , I did the instructions but keystone still do not want to init.

capture d ecran 2018-10-14 a 10 51 08

@jennaprice
Copy link

@youbihi I replied in the slack channel.

@RichardAgama
Copy link

$npm audit fix
or
$npm audit fix --force
fixed the bson problem for me

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

No branches or pull requests

7 participants