Better behavior when no configuration file is found
See original GitHub issueFollow-up on #497.
Using a configuration file is optional. As such, the configuration defaults to an empty object when no configuration file is found. No exceptions are thrown.
Please note:
- when no configuration file is found, we do print some message indicating no configuration file was found.
- when a
--config
path was explicitly specified, we do throw an error if it cannot be found
However it might be possible that no configuration files might have been found due to wrong user configuration. The only way I can think of would be when the configuration file was saved under a wrong filename. We could use Levenshtein distance or similar approach to try to guess when this happens, in order to print an error message.
Issue Analytics
- State:
- Created 4 years ago
- Comments:11 (9 by maintainers)
Top Results From Across the Web
eslint throws exception when no configuration file found. #7144
When no configuration file is present, eslint prints an exception backtrace to the console and returns an exit status of 1.
Read more >Getting an error “No configuration file found” while
Getting an error “No configuration file found” while trying to install Windows 7 from a thumb drive. * Original Title: ERROR: No cofiguration...
Read more >java - No log4j2 configuration file found. Using default ...
Problem 1. ERROR StatusLogger No log4j2 configuration file found. Using default configuration: logging only errors to the console.
Read more >Configuring Log4j 2 - Apache Logging Services
If no configuration file could be located the DefaultConfiguration will be used. This will cause logging output to go to the console.
Read more >Log4j2 Properties File Example - HowToDoInJava
The default behavior kicks in when: there is no log4j.configurationFile property is present in the startup arguments or when this property doesn ...
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 Free
Top 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
Personally, I wouldn’t close this until there are links to docs in the warnings and/or an issue is open to create clearer docs around defaults and config composition.
This sounds like a dev error in the CLI. There is a-lot of confusion around the
netlify dev
settings and ports in general https://github.com/netlify/cli/issues/563. If you have ideas to makenetlify dev
and it’s related configuration please let me know 😃