Keystone JS on a MEAN Stack, anybody run into "Cannot Find Express Module" when doing node keystone?

Posted December 2, 2015 4.8k views
Node.jsDigitalOcean 1-Click Apps MarketplaceMEANCMS

I did a fresh install on keystonejs on a meanstack and i get this error:

Error: Cannot find module ‘Express’

Now installed it using npm install -g express and still didnt work. Any ideas on how to fix this problem?

Was looking forward to using keystonejs.


1 comment
  • I have similar problem but with Keystone module itself.

    Droplet - Ubuntu 16.04.1

    I have node, mongodb, express, yo, keystone installed via npm install -g,

    Also i did npm install in keystone’s project dir.

    Error log -

    **node keystone.js *
    throw err;

    Error: Cannot find module ‘keystone’
    at Function.Module.resolveFilename (module.js:455:15)
    at Function.Module.load (module.js:403:25)
    at Module.require (module.js:483:17)
    at require (internal/module.js:20:19)
    at Object.<anonymous> (/home/stadmin/sta-test1/keystone.js:6:16)
    at Module.compile (module.js:556:32)
    at Object.Module.extensions..js (module.js:565:10)
    at Module.load (module.js:473:32)
    at tryModuleLoad (module.js:432:12)
    at Function.Module._load (module.js:424:3)*

    Any support/help is greatly appreciated !

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Submit an Answer
3 answers

I’m having the same issue. Anyone got any ideas here?

Try to use npm install express without -g flag. You need to have local express instance located in node_modules.