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
{{ message }}
Repository navigation
Hot runtime on Node 22: a compiled ES build that re-exports a CommonJS sibling fails to link #847
Under hotRuntime on Node 22, importing a package whose ES build the engine compiles fails when that build re-exports a sibling that resolves to a CommonJS file. The import throws before any test runs:
Error: request for '…/build/badge.js?vnhot=1&vnnode' is from a module not been linked
code: 'ERR_VM_MODULE_LINK_FAILURE'
❯ …/build/index.mjs:1:158
❯ VitestModuleEvaluator.wrapped [as runExternalModule] dist/native/rntl-hooks.mjs:84:23
The shape is build/index.mjs containing export * from "./badge", with ./badge resolving to the CommonJS build/badge.js. The tests-native/fixtures/rn-esbuild-reexport-lib fixture has it. The sibling does not need JSX: a plain CommonJS badge.js fails the same way.
Node 22.22.3 with hotRuntime: true: fails.
Node 22.22.3 without the hot runtime: passes.
Node 24.12 and Node 26: pass.
main's loader fails the same way, so the failure predates the fix for compiled re-exports.
Reproduce with Node 22.22.3, after bun run build:
node scripts/ci/vitest.mjs run --config tests-native/vitest.hot.config.mts tests-native/esbuild-reexport-jsx.test.tsx
tests-native/esbuild-reexport-jsx.test.tsx skips its ES-build cases under the hot runtime on Node 22 and names this issue. Remove that skip once the import links.
Activity
test(native): skip the re-export test's ES-build cases under the hot …
fix(hot): a compiled ES index's require() of a CommonJS sibling links…
fix(native): an imported namespace carries the names a module re-expo…
test(native): run the esbuild re-export ES cases under the hot runtim…
danfry1 commentedon Nov 15, 2026
Fixed by #850, released in 0.15.1.