[Bug]: missing module graph cache entry aborts persistent-cache recovery
Author: hardfistCreated Jul 20, 2026Updated Sep 28, 2026
Labelsbug
Reproduction
Repository: https://github.com/hardfist/rspack-persistent-cache-missing-module-recovery-repro
This is a JavaScript repro using the public compiler API and the published @rspack/[email protected] package:
pnpm install
pnpm reproThe script:
- Builds an entry module that imports
src/dep.jswith filesystem persistent cache enabled. - Removes only the
src/dep.jsrecord fromoccasion_make_module_graph/0.pack. - Recomputes the pack integrity hash, so the storage layer accepts the intentionally incomplete cache.
- Starts a fresh Node process against that cache.
Observed output on @rspack/[email protected]:
recover exit: signal SIGABRT
ModuleGraphModule with identifier Identifier(...) not foundThe repro exits 0 after detecting this panic.
Expected behavior
An incomplete or partially recovered module-graph cache should be treated as a cache miss (invalidate/rebuild the affected scope, or return a recoverable compilation error). It should not abort the Node process during persistent-cache recovery.
Environment
@rspack/[email protected]- Node.js 24
- macOS arm64
Source: web-infra-dev/rspack