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

December 2, 2015 3.6k views
Node.js One-Click Install Apps MEAN CMS

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 !

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.

Have another answer? Share your knowledge.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!