@@ -41,6 +41,7 @@ Universal API for creating [Node.js errors][1]
41
41
- [ ` ERR_PACKAGE_IMPORT_NOT_DEFINED(specifier, base[, dir]) ` ] ( #err_package_import_not_definedspecifier-base-dir )
42
42
- [ ` ERR_PACKAGE_PATH_NOT_EXPORTED(dir, subpath[, base]) ` ] ( #err_package_path_not_exporteddir-subpath-base )
43
43
- [ ` ERR_UNHANDLED_ERROR([err]) ` ] ( #err_unhandled_errorerr )
44
+ - [ ` ERR_UNKNOWN_BUILTIN_MODULE(name) ` ] ( #err_unknown_builtin_modulename )
44
45
- [ ` ERR_UNKNOWN_ENCODING(encoding) ` ] ( #err_unknown_encodingencoding )
45
46
- [ ` ERR_UNKNOWN_FILE_EXTENSION(ext, id[, suggestion]) ` ] ( #err_unknown_file_extensionext-id-suggestion )
46
47
- [ ` ERR_UNKNOWN_MODULE_FORMAT(format, id) ` ] ( #err_unknown_module_formatformat-id )
@@ -226,6 +227,7 @@ This package exports the following identifiers:
226
227
- [ ` ERR_PACKAGE_IMPORT_NOT_DEFINED ` ] ( #err_package_import_not_definedspecifier-base-dir )
227
228
- [ ` ERR_PACKAGE_PATH_NOT_EXPORTED ` ] ( #err_package_path_not_exporteddir-subpath-base )
228
229
- [ ` ERR_UNHANDLED_ERROR ` ] ( #err_unhandled_errorerr )
230
+ - [ ` ERR_UNKNOWN_BUILTIN_MODULE ` ] ( #err_unknown_builtin_modulename )
229
231
- [ ` ERR_UNKNOWN_ENCODING ` ] ( #err_unknown_encodingencoding )
230
232
- [ ` ERR_UNKNOWN_FILE_EXTENSION ` ] ( #err_unknown_file_extensionext-id-suggestion )
231
233
- [ ` ERR_UNKNOWN_MODULE_FORMAT ` ] ( #err_unknown_module_formatformat-id )
@@ -387,7 +389,7 @@ Thrown when a [`package.json`][8] file fails parsing.
387
389
- ` {string} ` ** ` id ` ** &mdash ; Location of invalid ` package.json ` file
388
390
- ` {string?} ` ** ` [base=''] ` ** &mdash ; Id of module being imported. May also include where module is being imported from
389
391
- ` {string?} ` ** ` [reason=''] ` ** &mdash ; Reason package config is invalid
390
- - ** Returns** : ` {NodeError<Error> } `
392
+ - ** Returns** : ` {NodeError} `
391
393
392
394
> ** Source** : [ ` src/models/err-invalid-package-config.ts ` ] ( src/models/err-invalid-package-config.ts )
393
395
@@ -401,7 +403,7 @@ the attempted module resolution.
401
403
- ` {unknown} ` ** ` target ` ** &mdash ; Invalid package target
402
404
- ` {boolean?} ` ** ` [internal=false] ` ** &mdash ; ` target ` is ` "imports" ` ?
403
405
- ` {string?} ` ** ` [base=''] ` ** &mdash ; Id of module ` package.json ` was imported from
404
- - ** Returns** : ` {NodeError<Error> } `
406
+ - ** Returns** : ` {NodeError} `
405
407
406
408
> ** Source** : [ ` src/models/err-invalid-package-target.ts ` ] ( src/models/err-invalid-package-target.ts )
407
409
@@ -419,7 +421,7 @@ Thrown when an invalid URL is passed to a [WHATWG][11] [`URL` constructor][12] o
419
421
Thrown when a method is required but not implemented.
420
422
421
423
- ` {string} ` ** ` method ` ** &mdash ; Method name
422
- - ** Returns** : ` {NodeError<Error> } `
424
+ - ** Returns** : ` {NodeError} `
423
425
424
426
> ** Source** : [ ` src/models/err-method-not-implemented.ts ` ] ( src/models/err-method-not-implemented.ts )
425
427
@@ -440,7 +442,7 @@ when loading a program entry point.
440
442
- ` {string} ` ** ` id ` ** &mdash ; Id of missing module
441
443
- ` {string} ` ** ` base ` ** &mdash ; Id of module ` id ` was imported from
442
444
- ` {string?} ` ** ` [type='package'] ` ** &mdash ; Module file type
443
- - ** Returns** : ` {NodeError<Error> } `
445
+ - ** Returns** : ` {NodeError} `
444
446
445
447
> ** Source** : [ ` src/models/err-module-not-found.ts ` ] ( src/models/err-module-not-found.ts )
446
448
@@ -451,7 +453,7 @@ Thrown when a network module attempts to load another module that it is not allo
451
453
- ` {string} ` ** ` specifier ` ** &mdash ; Invalid module specifier
452
454
- ` {string} ` ** ` base ` ** &mdash ; Id of module ` specifier ` was imported from
453
455
- ` {string} ` ** ` reason ` ** &mdash ; Reason for error
454
- - ** Returns** : ` {NodeError<Error> } `
456
+ - ** Returns** : ` {NodeError} `
455
457
456
458
> ** Source** : [ ` src/models/err-network-import-disallowed.ts ` ] ( src/models/err-network-import-disallowed.ts )
457
459
@@ -460,7 +462,7 @@ Thrown when a network module attempts to load another module that it is not allo
460
462
Thrown when an operation has failed. Typically used to signal the general failure of an asynchronous operation.
461
463
462
464
- ` {string} ` ** ` reason ` ** &mdash ; Reason for operation failure
463
- - ** Returns** : ` {NodeError<Error> } `
465
+ - ** Returns** : ` {NodeError} `
464
466
465
467
> ** Source** : [ ` src/models/err-operation-failed.ts ` ] ( src/models/err-operation-failed.ts )
466
468
@@ -482,7 +484,7 @@ Thrown when a `package.json` [`"exports"`][9] field does not export the requeste
482
484
- ` {string} ` ** ` dir ` ** &mdash ; Id of directory containing ` package.json `
483
485
- ` {string} ` ** ` subpath ` ** &mdash ; Requested subpath
484
486
- ` {string?} ` ** ` [base=''] ` ** &mdash ; Id of module ` subpath ` was imported from
485
- - ** Returns** : ` {NodeError<Error> } `
487
+ - ** Returns** : ` {NodeError} `
486
488
487
489
> ** Source** : [ ` src/models/err-package-path-not-exported.ts ` ] ( src/models/err-package-path-not-exported.ts )
488
490
@@ -491,10 +493,19 @@ Thrown when a `package.json` [`"exports"`][9] field does not export the requeste
491
493
Thrown when an unhandled error occurs.
492
494
493
495
- ` {string?} ` ** ` [err=''] ` ** &mdash ; Stringified error
494
- - ** Returns** : ` {NodeError<Error> } `
496
+ - ** Returns** : ` {NodeError} `
495
497
496
498
> ** Source** : [ ` src/models/err-unhandled-error.ts ` ] ( src/models/err-unhandled-error.ts )
497
499
500
+ #### ` ERR_UNKNOWN_BUILTIN_MODULE(name) `
501
+
502
+ Thrown when an unknown [ builtin module] [ 14 ] is encountered.
503
+
504
+ - ` {string} ` ** ` name ` ** &mdash ; Module name
505
+ - ** Returns** : ` {NodeError} `
506
+
507
+ > ** Source** : [ ` src/models/err-unknown-builtin-module.ts ` ] ( src/models/err-unknown-builtin-module.ts )
508
+
498
509
#### ` ERR_UNKNOWN_ENCODING(encoding) `
499
510
500
511
Thrown when an invalid or unknown encoding option is passed to a Node.js API.
@@ -531,7 +542,7 @@ Thrown when a directory URL is `import`ed.
531
542
532
543
- ` {string} ` ** ` id ` ** &mdash ; Module id of directory
533
544
- ` {string} ` ** ` base ` ** &mdash ; Id of module ` id ` was imported from
534
- - ** Returns** : ` {NodeError<Error> } `
545
+ - ** Returns** : ` {NodeError} `
535
546
536
547
> ** Source** : [ ` src/models/err-unsupported-dir-import.ts ` ] ( src/models/err-unsupported-dir-import.ts )
537
548
@@ -542,7 +553,7 @@ Thrown when an unsupported URL scheme is used in an `import` statement. URL sche
542
553
- ` {URL} ` ** ` url ` ** &mdash ; URL containing unsupported scheme
543
554
- ` {string[]} ` ** ` supported ` ** &mdash ; Supported URL schemes
544
555
- ` {boolean?} ` ** ` [windows=false] ` ** &mdash ; Windows operating system?
545
- - ** Returns** : ` {NodeError<Error> } `
556
+ - ** Returns** : ` {NodeError} `
546
557
547
558
> ** Source** : [ ` src/models/err-unsupported-esm-url-scheme.ts ` ] ( src/models/err-unsupported-esm-url-scheme.ts )
548
559
@@ -553,7 +564,7 @@ Thrown when an unsupported URL scheme is used in an `import` statement. URL sche
553
564
Creates a Node.js error constructor.
554
565
555
566
If the given error ` message ` is a function, constructor arguments are passed to ` message ` . If the ` message ` is a string,
556
- constructor arguments are passed to [ ` util.format ` ] [ 14 ] instead.
567
+ constructor arguments are passed to [ ` util.format ` ] [ 15 ] instead.
557
568
558
569
- ` {ErrorCode} ` ** ` code ` ** &mdash ; Node.js error code
559
570
- ` {B extends ErrorConstructor} ` ** ` Base ` ** &mdash ; Error base class
@@ -573,7 +584,7 @@ Determines the specific type of a value for type-mismatch errors.
573
584
574
585
## Types
575
586
576
- This package is fully typed with [ TypeScript] [ 15 ] . It exports the following definitions:
587
+ This package is fully typed with [ TypeScript] [ 16 ] . It exports the following definitions:
577
588
578
589
### Enums
579
590
@@ -608,5 +619,6 @@ See [`CONTRIBUTING.md`](CONTRIBUTING.md).
608
619
[ 11 ] : https://nodejs.org/api/url.html#the-whatwg-url-api
609
620
[ 12 ] : https://nodejs.org/api/url.html#new-urlinput-base
610
621
[ 13 ] : https://nodejs.org/api/url.html#urlparseurlstring-parsequerystring-slashesdenotehost
611
- [ 14 ] : https://nodejs.org/api/util.html#utilformatformat-args
612
- [ 15 ] : https://www.typescriptlang.org
622
+ [ 14 ] : https://nodejs.org/api/module.html#modulebuiltinmodules
623
+ [ 15 ] : https://nodejs.org/api/util.html#utilformatformat-args
624
+ [ 16 ] : https://www.typescriptlang.org
0 commit comments