sydjs-site: Error: Cannot find module 'dotenv'

hello everybody , i believe i did everything right and followed your instruction and after i run, node keystone , i´ve got the following errors:

/development/sysjs-site/sydjs-site$ node keystone

module.js:340
    throw err;
          ^
Error: Cannot find module 'dotenv'
    at Function.Module._resolveFilename (module.js:338:15)
    at Function.Module._load (module.js:280:25)
    at Module.require (module.js:364:17)
    at require (module.js:380:17)
    at Object.<anonymous> (/home/macbroadcast/development/sysjs-site/sydjs-site/keystone.js:2:1)
    at Module._compile (module.js:456:26)
    at Object.Module._extensions..js (module.js:474:10)
    at Module.load (module.js:356:32)
    at Function.Module._load (module.js:312:12)
    at Function.Module.runMain (module.js:497:10)
/development/sysjs-site/sydjs-site$ 

About this issue

  • Original URL
  • State: closed
  • Created 10 years ago
  • Comments: 22

Most upvoted comments

Please run this command to resolve this error.

image

Hi @macbroadcast, make sure you do an npm install before running node keystone, looks like you haven’t installed the modules yet that are defined in package.json.

npm install --dotenv-extended did not help me

Mine was fixed by just a simple npm install dotenv

This worked for me

Initial env: NODE_ENV=production

it was failing to install dependencies

then I changed env:

NODE_ENV=development

I was able to resolve dependencies and start the application

github da console nerde

sorry, about what you?

вс, 4 апр. 2021 г. в 20:15, SametReyiz61 @.***>:

github da console nerde

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/JedWatson/sydjs-site/issues/36#issuecomment-813067409, or unsubscribe https://github.com/notifications/unsubscribe-auth/ANEX4TEOR6RRNXLCBTL5KBLTHCNCTANCNFSM4AUHH43A .