DF8001: Memoized Hub Instance Replaced
Message
initHub replaced the live hub instance memoized under key "
{key}": its options changed since the previous call.
Cause
initHub was called with a key that already maps to a live instance, but the option fingerprint differs from the memoized one's. Dev servers that re-evaluate modules on the fly (Next.js, Nitro, SvelteKit HMR) re-run initHub on every reload; the key memoization normally returns the live instance, but when the options genuinely changed the old instance — including its side-car WebSocket server — is closed and a fresh one starts.
Example
import { initHub } from '@devframes/hub/initiate'
// First evaluation:
initHub({ key: 'devtools', devframes: [git] })
// A later reload with a different frame list replaces the live instance:
initHub({ key: 'devtools', devframes: [git, terminals] }) // ⚠ DF8001Fix
This is informational when you edited the options on purpose — the replacement is the intended behavior. If it fires without an intentional change, keep the options stable across reloads (module-level constants rather than values recomputed per evaluation), or give genuinely different hubs distinct keys.
Source
packages/hub/src/node/initiate.ts—initHubwarns this before closing and replacing a memoized instance whose options fingerprint changed.