Cannot find module './config.json'
See original GitHub issueI 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:
- Created 8 years ago
- Comments:13 (8 by maintainers)
Top 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 >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
brilliant 😃 absolutely - just added json to the moduleFileExtensions and it works
so not at all a helmet thing 😃 - maybe there’s a similar condition with the original issue from @martianmartian
@martianmartian I’m going to close this issue for now. Feel free to reopen it if you’re still having trouble!