GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — errors: fix ERR_MISSING_DYNAMIC_INSTANTIATE_HOOK · nodejs/node@1e5afb7

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • doc/api
    • errors.md
  • lib/internal
    • errors.js
    • modules/esm
      • loader.js
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎doc/api/errors.md‎

Copy file name to clipboardExpand all lines: doc/api/errors.md
+8Lines changed: 8 additions & 0 deletions
  • Display the source diff
  • Display the rich diff
Original file line numberDiff line numberDiff line change
@@ -1340,6 +1340,14 @@ strict compliance with the API specification (which in some cases may accept
13401340
`func(undefined)` and `func()` are treated identically, and the
13411341
[`ERR_INVALID_ARG_TYPE`][] error code may be used instead.
13421342

1343+
<a id="ERR_MISSING_DYNAMIC_INSTANTIATE_HOOK"></a>
1344+
### ERR_MISSING_DYNAMIC_INSTANTIATE_HOOK
1345+
1346+
> Stability: 1 - Experimental
1347+
1348+
An [ES6 module][] loader hook specified `format: 'dynamic'` but did not provide
1349+
a `dynamicInstantiate` hook.
1350+
13431351
<a id="ERR_MISSING_MESSAGE_PORT_IN_TRANSFER_LIST"></a>
13441352
### ERR_MISSING_MESSAGE_PORT_IN_TRANSFER_LIST
13451353

Collapse file

‎lib/internal/errors.js‎

Copy file name to clipboardExpand all lines: lib/internal/errors.js
+3Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -747,6 +747,9 @@ E('ERR_MISSING_ARGS',
747747
}
748748
return `${msg} must be specified`;
749749
}, TypeError);
750+
E('ERR_MISSING_DYNAMIC_INSTANTIATE_HOOK',
751+
'The ES Module loader may not return a format of \'dynamic\' when no ' +
752+
'dynamicInstantiate function was provided', Error);
750753
E('ERR_MISSING_MODULE', 'Cannot find module %s', Error);
751754
E('ERR_MODULE_RESOLUTION_LEGACY',
752755
'%s not found by import in %s.' +
Collapse file

‎lib/internal/modules/esm/loader.js‎

Copy file name to clipboardExpand all lines: lib/internal/modules/esm/loader.js
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ const {
55
ERR_INVALID_RETURN_PROPERTY,
66
ERR_INVALID_RETURN_PROPERTY_VALUE,
77
ERR_INVALID_RETURN_VALUE,
8-
ERR_MISSING_DYNAMIC_INTSTANTIATE_HOOK,
8+
ERR_MISSING_DYNAMIC_INSTANTIATE_HOOK,
99
ERR_UNKNOWN_MODULE_FORMAT
1010
} = require('internal/errors').codes;
1111
const { URL } = require('url');
@@ -118,7 +118,7 @@ class Loader {
118118
let loaderInstance;
119119
if (format === 'dynamic') {
120120
if (typeof this._dynamicInstantiate !== 'function')
121-
throw new ERR_MISSING_DYNAMIC_INTSTANTIATE_HOOK();
121+
throw new ERR_MISSING_DYNAMIC_INSTANTIATE_HOOK();
122122

123123
loaderInstance = async (url) => {
124124
debug(`Translating dynamic ${url}`);

0 commit comments

Comments
0 (0)
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.