question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Error: Cannot find module 'dotenv'

See original GitHub issue

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$ 

Issue Analytics

  • State:closed
  • Created 9 years ago
  • Comments:22

github_iconTop GitHub Comments

66reactions
akashchitlangiacommented, Mar 20, 2018

Please run this command to resolve this error.

image

60reactions
bladeycommented, Sep 14, 2014

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.

Read more comments on GitHub >

github_iconTop Results From Across the Web

While running the script throws cannot find module 'dotenv'
While loading the .env file to pass env values to the getToken.js script in the cypress root folder throws Cannot find module 'dotenv'error....
Read more >
dotenv - npm
Loads environment variables from .env file. Latest version: 16.0.3, last published: 3 months ago. Start using dotenv in your project by ...
Read more >
[SOLVED] Error: Cannot find module 'dotenv' - Moralis Forum
I installed the ethers package. Usually, by installing ethers, you should get all the other dependencies as well. Make sure to install using...
Read more >
Cannot find module dotenv - The freeCodeCamp Forum
I figured the problem was that dotenv was listed as a devDependency so I tried npm i dotenv and even npm i -D...
Read more >
Error: Cannot find module - Render community
It sounds like you're not installing dependencies. Could you share some of you service settings, e.g. build & start commands, root directory, ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found