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

doc - Document MODULE_NOT_FOUND error code #21890

Closed
DullReferenceException opened this issue Jul 19, 2018 · 4 comments
Closed

doc - Document MODULE_NOT_FOUND error code #21890

DullReferenceException opened this issue Jul 19, 2018 · 4 comments
Labels
doc Issues and PRs related to the documentations. errors Issues and PRs related to JavaScript errors originated in Node.js core. module Issues and PRs related to the module subsystem.

Comments

@DullReferenceException
Copy link

  • 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.)

@addaleax
Copy link
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?

@addaleax addaleax added doc Issues and PRs related to the documentations. module Issues and PRs related to the module subsystem. errors Issues and PRs related to JavaScript errors originated in Node.js core. labels Jul 19, 2018
@DullReferenceException
Copy link
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.

@richardlau
Copy link
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).

@DullReferenceException
Copy link
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.

targos pushed a commit that referenced this issue Jul 24, 2018
Document `MODULE_NOT_FOUND` as a possible `code` for errors.

Also, some missorting of bottom references was fixed in passing.

PR-URL: #21894
Fixes: #21890
Reviewed-By: James M Snell <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
doc Issues and PRs related to the documentations. errors Issues and PRs related to JavaScript errors originated in Node.js core. module Issues and PRs related to the module subsystem.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants