You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Node.js 18 has changed the ESM Loader API, as I'm getting a new error with node@18.6.0:
Error [ERR_LOADER_CHAIN_INCOMPLETE]:
"node-esm-loader 'resolve'" did not call the next hook in its chain and
did not explicitly signal a short circuit.
If this is intentional, include `shortCircuit: true` in the hook's return.
at new NodeError (node:internal/errors:387:5)
at ESMLoader.resolve (node:internal/modules/esm/loader:860:13)
at async ESMLoader.getModuleJob (node:internal/modules/esm/loader:439:7)
at async Promise.all (index 0)
at async ESMLoader.import (node:internal/modules/esm/loader:541:24)
at async loadESM (node:internal/process/esm_loader:83:5)
at async handleMainPromise (node:internal/modules/run_main:65:12) {
code: 'ERR_LOADER_CHAIN_INCOMPLETE'
}
All my code is still working fine under Node 17.
More information on ESM loader API changes in Node 18.6:
Node.js ESM Loader hooks now support multiple custom loaders, and composition is
achieved via "chaining": foo-loader calls bar-loader calls qux-loader
(a custom loader must now signal a short circuit when intentionally not
calling the next). See the ESM docs for details.
Thanks for notifying! Fixed in #5 and published to npm as v0.1.2. I published a new version of node-esm-loader too which uses this new version under the hood.
Node.js 18 has changed the ESM Loader API, as I'm getting a new error with
node@18.6.0
:All my code is still working fine under Node 17.
More information on ESM loader API changes in Node 18.6:
Experimental ESM Loader Hooks API
Node.js ESM Loader hooks now support multiple custom loaders, and composition is
achieved via "chaining": foo-loader calls bar-loader calls qux-loader
(a custom loader must now signal a short circuit when intentionally not
calling the next). See the ESM docs for details.
Real-world use-cases are laid out for end-users with working examples in the
article Custom ESM loaders: Who, what, when, where, why, how.
Contributed by Jacob Smith, Geoffrey Booth, and Bradley Farias - nodejs/node#42623
The text was updated successfully, but these errors were encountered: