summaryrefslogtreecommitdiff
path: root/doc/api/errors.md
diff options
context:
space:
mode:
Diffstat (limited to 'doc/api/errors.md')
-rw-r--r--doc/api/errors.md46
1 files changed, 31 insertions, 15 deletions
diff --git a/doc/api/errors.md b/doc/api/errors.md
index 7e32ba1cfc..0161853774 100644
--- a/doc/api/errors.md
+++ b/doc/api/errors.md
@@ -844,6 +844,18 @@ provided.
Encoding provided to `TextDecoder()` API was not one of the
[WHATWG Supported Encodings][].
+<a id="ERR_ENTRY_TYPE_MISMATCH"></a>
+#### ERR_ENTRY_TYPE_MISMATCH
+
+> Stability: 1 - Experimental
+
+The `--entry-type=commonjs` flag was used to attempt to execute an `.mjs` file
+or a `.js` file where the nearest parent `package.json` contains
+`"type": "module"`; or
+the `--entry-type=module` flag was used to attempt to execute a `.cjs` file or
+a `.js` file where the nearest parent `package.json` either lacks a `"type"`
+field or contains `"type": "commonjs"`.
+
<a id="ERR_FALSY_VALUE_REJECTION"></a>
### ERR_FALSY_VALUE_REJECTION
@@ -1267,6 +1279,11 @@ An invalid or unexpected value was passed in an options object.
An invalid or unknown file encoding was passed.
+<a id="ERR_INVALID_PACKAGE_CONFIG"></a>
+### ERR_INVALID_PACKAGE_CONFIG
+
+An invalid `package.json` file was found which failed parsing.
+
<a id="ERR_INVALID_PERFORMANCE_MARK"></a>
### ERR_INVALID_PERFORMANCE_MARK
@@ -1440,7 +1457,7 @@ strict compliance with the API specification (which in some cases may accept
> Stability: 1 - Experimental
-An [ES6 module][] loader hook specified `format: 'dynamic'` but did not provide
+An [ES Module][] loader hook specified `format: 'dynamic'` but did not provide
a `dynamicInstantiate` hook.
<a id="ERR_MISSING_MESSAGE_PORT_IN_TRANSFER_LIST"></a>
@@ -1449,13 +1466,6 @@ a `dynamicInstantiate` hook.
A `MessagePort` was found in the object passed to a `postMessage()` call,
but not provided in the `transferList` for that call.
-<a id="ERR_MISSING_MODULE"></a>
-### ERR_MISSING_MODULE
-
-> Stability: 1 - Experimental
-
-An [ES6 module][] could not be resolved.
-
<a id="ERR_MISSING_PLATFORM_FOR_WORKER"></a>
### ERR_MISSING_PLATFORM_FOR_WORKER
@@ -1463,12 +1473,12 @@ The V8 platform used by this instance of Node.js does not support creating
Workers. This is caused by lack of embedder support for Workers. In particular,
this error will not occur with standard builds of Node.js.
-<a id="ERR_MODULE_RESOLUTION_LEGACY"></a>
-### ERR_MODULE_RESOLUTION_LEGACY
+<a id="ERR_MODULE_NOT_FOUND"></a>
+### ERR_MODULE_NOT_FOUND
> Stability: 1 - Experimental
-A failure occurred resolving imports in an [ES6 module][].
+An [ES Module][] could not be resolved.
<a id="ERR_MULTIPLE_CALLBACK"></a>
### ERR_MULTIPLE_CALLBACK
@@ -1555,7 +1565,7 @@ A given value is out of the accepted range.
> Stability: 1 - Experimental
-An attempt was made to `require()` an [ES6 module][].
+An attempt was made to `require()` an [ES Module][].
<a id="ERR_SCRIPT_EXECUTION_INTERRUPTED"></a>
### ERR_SCRIPT_EXECUTION_INTERRUPTED
@@ -2220,10 +2230,17 @@ A non-specific HTTP/2 error has occurred.
Used in the `repl` in case the old history file is used and an error occurred
while trying to read and parse it.
+<a id="ERR_INVALID_REPL_TYPE"></a>
+#### ERR_INVALID_REPL_TYPE
+
+> Stability: 1 - Experimental
+
+The `--entry-type=...` flag is not compatible with the Node.js REPL.
+
<a id="ERR_MISSING_DYNAMIC_INSTANTIATE_HOOK"></a>
#### ERR_MISSING_DYNAMIC_INSTANTIATE_HOOK
-Used when an [ES6 module][] loader hook specifies `format: 'dynamic'` but does
+Used when an [ES Module][] loader hook specifies `format: 'dynamic'` but does
not provide a `dynamicInstantiate` hook.
<a id="ERR_STREAM_HAS_STRINGDECODER"></a>
@@ -2250,7 +2267,6 @@ size.
This `Error` is thrown when a read is attempted on a TTY `WriteStream`,
such as `process.stdout.on('data')`.
-
[`'uncaughtException'`]: process.html#process_event_uncaughtexception
[`--force-fips`]: cli.html#cli_force_fips
[`Class: assert.AssertionError`]: assert.html#assert_class_assert_assertionerror
@@ -2293,7 +2309,7 @@ such as `process.stdout.on('data')`.
[`subprocess.kill()`]: child_process.html#child_process_subprocess_kill_signal
[`subprocess.send()`]: child_process.html#child_process_subprocess_send_message_sendhandle_options_callback
[`zlib`]: zlib.html
-[ES6 module]: esm.html
+[ES Module]: esm.html
[ICU]: intl.html#intl_internationalization_support
[Node.js Error Codes]: #nodejs-error-codes
[V8's stack trace API]: https://github.com/v8/v8/wiki/Stack-Trace-API