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.

Cannot find module './config.json'

See original GitHub issue

I guess my heroku has been caching the old version for a while, when i updated, it came out a new error.

Any thought?

Searching 2768 files for “./config.json”

/Users/macbookpro/Desktop/langtime3/node_modules/helmet/index.js:
    2  
    3  var crossdomain = require('./lib/deprecated-crossdomain');
    4: var config = require('./config.json');
    5  
    6  function helmet() {

/Users/macbookpro/Desktop/langtime3/node_modules/helmet/test/index.js:
    1  var helmet = require('..');
    2: var config = require('../config.json');
    3  
    4  var assert = require('assert');

2 matches across 2 files

Issue Analytics

  • State:closed
  • Created 8 years ago
  • Comments:13 (8 by maintainers)

github_iconTop GitHub Comments

5reactions
rdoohcommented, Oct 26, 2015

brilliant 😃 absolutely - just added json to the moduleFileExtensions and it works

"moduleFileExtensions": ["js", "json", "node"]

so not at all a helmet thing 😃 - maybe there’s a similar condition with the original issue from @martianmartian

0reactions
EvanHahncommented, Nov 12, 2015

@martianmartian I’m going to close this issue for now. Feel free to reopen it if you’re still having trouble!

Read more comments on GitHub >

github_iconTop Results From Across the Web

javascript - Error - Cannot find module 'config' - Stack Overflow
I used the following code & it worked :- config = require('../config/config');.
Read more >
Code Help - Discord - Glitch Support
Error: Cannot find module './config.json' discord.js ... It sounds like it can't find a file called config.json at the location you've specified. Check...
Read more >
Error: Cannot find module 'config' · Issue #404 · vercel/pkg
I've distilled this issue down to a simple test. I'm using the node "config" module to define configuration values for my app. Pkg...
Read more >
When i run gulp in laravel root folder I get error - Laracasts
When i run gulp in laravel root folder I get error: vagrant@salomon:~/www/kmetija24$ gulp module.js:340 throw err; ^ Error: Cannot find module './config' at ......
Read more >
r/node - Reddit
Error : Cannot find module '../config..json' ? Why is there config..json when i didn't put that as the path?
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