Improve error messages #123
Merged
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.
A typical error message (e.g. Browserify) with this module looks like the following:
This has several issues. First, it does not show the file from which the missing module is being required (it does show the name of the missing file/module and the directory from which it is searching). Second, the stack trace doesn't provide a good indication of the source of the modules involved. Users with monolithic build tasks will find this error extremely confusing, as it does not provide a clear indication of what action could have generated this error, why it was generated, where it was generated or how to fix it.
This PR changes the error such that it appears like so:
This error:
Ideally, this error would give the entire traceback (in the form of
required by
) from the unresolved module./nonexistant
all the way back up the require chain to the entry file, but that is a non-trivial change.60/60 tests passing.