Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bootstrap: usable error on missing internal module #29593

Commits on Sep 17, 2019

  1. bootstrap: usable error on missing internal module

    Due to how bootstrap/loaders.js itself is loaded and invoked,
    stacktraces from it are munged and no longer point back to the error
    source.
    
    That resulted in the following unhelpful error if an internal module
    was missing or misnamed:
    
    ```
    internal/bootstrap/loaders.js:190
      return mod.compile();
                 ^
    
    TypeError: Cannot read property 'compile' of undefined
    ```
    
    This changes that to at least print the id that was attempted to be
    loaded:
    
    ```
    internal/bootstrap/loaders.js:189
      if (!mod) throw new TypeError(`Missing internal module '${id}'`);
                ^
    
    TypeError: Missing internal module 'internal/a'
    ```
    Fishrock123 committed Sep 17, 2019
    Configuration menu
    Copy the full SHA
    9f804d1 View commit details
    Browse the repository at this point in the history