Skip to content

doc - Document MODULE_NOT_FOUND error code #21890

Description

@DullReferenceException
  • Version: All
  • Platform: N/A
  • Subsystem: N/A

The error code MODULE_NOT_FOUND doesn't seem to be documented (see https://nodejs.org/dist/latest-v8.x/docs/api/errors.html#nodejs-error-codes). Having it officially supported/documented will help us safely implement "tryRequire" operations for optional files.

(By the way, I'm not finding where the API documents live. Maybe the docs for how to update docs could be surfaced better so this could have taken the form of a PR.)

Activity

  1. addaleax commented on Jul 19, 2018

    @addaleax
    Member

    (By the way, I'm not finding where the API documents live. Maybe the docs for how to update docs could be surfaced better so this could have taken the form of a PR.)

    They’re in doc/api, and some more generic information is in https://github.com/nodejs/node/blob/master/doc/guides/contributing/pull-requests.md#step-3-code – if that’s helpful, would you be interested in working on a PR?

  2. added
    docIssues and PRs related to Node.js documentation.
    moduleIssues and PRs related to the module subsystem.
    errorsIssues and PRs related to JavaScript errors originating in Node.js core.
    on Jul 19, 2018
  3. DullReferenceException commented on Jul 19, 2018

    @DullReferenceException
    Author

    Ah, thought it'd be in the nodejs.org repo. Maybe that repo could add a note for those that are lost. I'll create a PR.

  4. richardlau commented on Jul 19, 2018

    @richardlau
    Member

    Also as of #21703 there is now an Edit on GitHub link on each page, e.g. https://nodejs.org/dist/latest-v10.x/docs/api/errors.html (not on v8.x yet until that PR is backported).

  5. DullReferenceException commented on Jul 19, 2018

    @DullReferenceException
    Author

    I noticed that MODULE_NOT_FOUND doesn't follow the ERR_* naming conventions like all the other documented codes, but changing the code could be a breaking change for many.

  6. added a commit that references this issue on Jul 24, 2018
  7. added a commit that references this issue on Jul 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    docIssues and PRs related to Node.js documentation.errorsIssues and PRs related to JavaScript errors originating in Node.js core.moduleIssues and PRs related to the module subsystem.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions