From 69bfb9f36e742690d7575c24284c84b259c20c97 Mon Sep 17 00:00:00 2001 From: Jacob Page Date: Thu, 19 Jul 2018 12:41:51 -0700 Subject: [PATCH 1/6] Document MODULE_NOT_FOUND Document `MODULE_NOT_FOUND` as a possible `code` for errors. --- doc/api/errors.md | 7 +++++++ doc/api/modules.md | 1 + 2 files changed, 8 insertions(+) diff --git a/doc/api/errors.md b/doc/api/errors.md index 91ec811b2af194..c4a97d77bceea1 100644 --- a/doc/api/errors.md +++ b/doc/api/errors.md @@ -1831,6 +1831,12 @@ unknown file extension. Creation of a [`zlib`][] object failed due to incorrect configuration. + +### MODULE_NOT_FOUND + +A module file could not be resolved while attempting a [`require`][] or +`import` operation. + [`'uncaughtException'`]: process.html#process_event_uncaughtexception [`--force-fips`]: cli.html#cli_force_fips [`child_process`]: child_process.html @@ -1886,3 +1892,4 @@ Creation of a [`zlib`][] object failed due to incorrect configuration. [try-catch]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/try...catch [vm]: vm.html [WHATWG Supported Encodings]: util.html#util_whatwg_supported_encodings +[`require`]: modules.html#require diff --git a/doc/api/modules.md b/doc/api/modules.md index 71de4e519e119a..11fe780403f557 100644 --- a/doc/api/modules.md +++ b/doc/api/modules.md @@ -542,6 +542,7 @@ A reference to the current module, see the section about the [`module` object][]. In particular, `module.exports` is used for defining what a module exports and makes available through `require()`. + ### require()