Warn users when failing to require preboot#54
Merged
rmarkins-godaddy merged 1 commit intogodaddy:mainfrom Nov 20, 2025
Merged
Conversation
jpage-godaddy
approved these changes
Nov 20, 2025
rmarkins-godaddy
approved these changes
Nov 20, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
When you have an error in any of the preboots, middlewares or routes modules or any other file required by those modules the error will be omitted by the catch in
lib/preboot/require.js.Essentially, this means that any require or runtime error in any file that is used during application startup will be omitted and the application will start in an invalid state. For example, the application might start without registered routes or without essentials preboots.
Goal
The goal of this simple fix is to:
Considerations
DEBUG=*would show this. However I don't consider this an alternative because:DEBUG=*when debugging an issue. I have hardly used that myself.DEBUG=*dramatically increases the amount of console output not really helping troubleshoot unless you already know what you're looking forNODE_ENVbut I know there is a lot of variability in how that is filled for a 'local' env, so I think it's a nonstarterHope this sounds reasonable. If not, I am happy to discuss alternatives or update the code 👍
I have been bitten SO MANY TIMES by errors being swallowed! I hope we can figure something out that makes sure no other dev needs to waste as much time as I have on this again