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.

Better behavior when no configuration file is found

See original GitHub issue

Follow-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:closed
  • Created 4 years ago
  • Comments:11 (9 by maintainers)

github_iconTop GitHub Comments

1reaction
jlengstorfcommented, Dec 5, 2019

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.

1reaction
DavidWellscommented, Dec 5, 2019

For example setting any config in the dev section causes dev to break without all options being set (as far as I can tell; lots of port errors).

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 make netlify dev and it’s related configuration please let me know 😃

Read more comments on GitHub >

github_iconTop 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 >

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