lukeed / tsm

TypeScript Module Loader
MIT License
1.18k stars 19 forks source link

`ERR_LOADER_CHAIN_INCOMPLETE` on Node.js 18.6 #36

Closed ai closed 2 years ago

ai commented 2 years ago

After updating to Node.js 18.6.0 I start to have an error:

> tsm node_modules/uvu/bin.js . '\.test\.(ts|js)$'

(node:111446) ExperimentalWarning: Custom ESM Loaders is an experimental feature. This feature could change at any time
(Use `node --trace-warnings ...` to show where the warning was created)
(node:111446) DeprecationWarning: Obsolete loader hook(s) supplied and will be ignored: getFormat, transformSource
Error [ERR_LOADER_CHAIN_INCOMPLETE]: "file:///home/ai/Dev/nanostores/node_modules/.pnpm/tsm@2.2.1/node_modules/tsm/loader.mjs 'load'" 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.load (node:internal/modules/esm/loader:624:13)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async ESMLoader.moduleProvider (node:internal/modules/esm/loader:472:11)
    at async link (node:internal/modules/esm/module_job:67:21)

It looks like a conflict with a new loader API from Node.js 18.6