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
Whether a package's module-sync export target is traced depends on the Node.js
version running nodeFileTrace (getNodeMajorVersion() >= 22 in resolve-dependency.ts), not on what supported runtimes resolve. Node's CJS loader
matches module-sync from 20.19, so every Node 20.x build (including latest
20.20.2) omits a file that even its own runtime resolves — pruned output crashes
with MODULE_NOT_FOUND with no build/deploy version skew at all.
Minimal repro: https://github.com/timfish/repro-nft-module-sync — npm run repro
fails on Node 20.x, passes on Node 22; require.resolve('meriyah') and the trace
disagree within a single process.
Related: the wildcard-exports branch from #584 has the mirror problem — on Node >= 22
it emits only the module-sync target (fallback gated on moduleSyncCatchall,
default false), breaking older deploy runtimes.
Possible directions — happy to PR whichever you prefer:
Whether a package's
module-syncexport target is traced depends on the Node.jsversion running
nodeFileTrace(getNodeMajorVersion() >= 22inresolve-dependency.ts), not on what supported runtimes resolve. Node's CJS loadermatches
module-syncfrom 20.19, so every Node 20.x build (including latest20.20.2) omits a file that even its own runtime resolves — pruned output crashes
with
MODULE_NOT_FOUNDwith no build/deploy version skew at all.Minimal repro: https://github.com/timfish/repro-nft-module-sync —
npm run reprofails on Node 20.x, passes on Node 22;
require.resolve('meriyah')and the tracedisagree within a single process.
Related: the wildcard-exports branch from #584 has the mirror problem — on Node >= 22
it emits only the
module-synctarget (fallback gated onmoduleSyncCatchall,default
false), breaking older deploy runtimes.Possible directions — happy to PR whichever you prefer:
moduleSyncCatchalltotrue(feat: add module-sync catchall tracing #584 already emits both targets behind it)>= 22→ also 20.19+) — still leaves build-vs-deployversion skew unsound
Seen in the wild via
meriyah@6.1.x: Nitro server bundles (nuxt/solidstart/tanstackprod servers crash at boot) and AWS Lambda layers built on Node 20.