remix-run/react-router · error
The `future.unstable_subResourceIntegrity` flag has been sta
Error message
The `future.unstable_subResourceIntegrity` flag has been stabilized and moved to a top-level `config.subResourceIntegrity` field
What it means
Fatal config-validation error: `future.unstable_subResourceIntegrity` was stabilized. The option now lives as the top-level `config.subResourceIntegrity` boolean (default false, resolved at config.ts line 755), so keeping the old future key aborts readConfig with instructions to move it. SRI adds integrity hashes to prerendered/asset tags; only the location changed, not the behavior.
Source
Thrown at packages/react-router-dev/config/config.ts:740
}
if (
"unstable_middleware" in futureConfig ||
"v8_middleware" in futureConfig
) {
return err(
"The `future.v8_middleware` flag has been removed because middleware is now always enabled",
);
}
if (
"unstable_trailingSlashAwareDataRequests" in futureConfig ||
"v8_trailingSlashAwareDataRequests" in futureConfig
) {
return err(
"The `future.v8_trailingSlashAwareDataRequests` flag has been removed because trailing slash-aware data requests are now the default behavior",
);
}
if ("unstable_subResourceIntegrity" in futureConfig) {
return err(
"The `future.unstable_subResourceIntegrity` flag has been stabilized and moved to a top-level `config.subResourceIntegrity` field",
);
}
}
let future: FutureConfig = {
unstable_enableNodeReadableStream:
userAndPresetConfigs.future?.unstable_enableNodeReadableStream ?? false,
unstable_optimizeDeps:
userAndPresetConfigs.future?.unstable_optimizeDeps ?? false,
};
let allowedActionOrigins = userAndPresetConfigs.allowedActionOrigins ?? false;
let splitRouteModules = userAndPresetConfigs.splitRouteModules ?? true;
let subResourceIntegrity = userAndPresetConfigs.subResourceIntegrity ?? false;
let reactRouterConfig: ResolvedReactRouterConfig = deepFreeze({
appDirectory,View on GitHub (pinned to 6beaca3952)
Solutions
- Move the option to the top level: replace `future: { unstable_subResourceIntegrity: true }` with `subResourceIntegrity: true`
- Keep the value semantics: true enables SRI, omit/false disables — nothing else changed
- Re-run typegen so `.react-router/types` reflect the top-level field
- Remove any `satisfies FutureConfig` typing that still lists the old key
Example fix
// before - react-router.config.ts
import type { Config } from "@react-router/dev";
export default {
future: { unstable_subResourceIntegrity: true },
} satisfies Config;
// after
export default {
subResourceIntegrity: true,
} satisfies Config; Defensive patterns
Strategy: validation
Validate before calling
import fs from "node:fs";
let cfg = fs.readFileSync("react-router.config.ts", "utf8");
if (cfg.includes("unstable_subResourceIntegrity")) {
throw new Error("Move `future.unstable_subResourceIntegrity` to top-level `subResourceIntegrity`");
} Type guard
// guard the moved option on a parsed config object
function hasTopLevelSRI(cfg: unknown): cfg is { subResourceIntegrity: boolean } {
if (typeof cfg !== "object" || cfg === null) return false;
let f = (cfg as { future?: Record<string, unknown> }).future;
return !(f && "unstable_subResourceIntegrity" in f);
} Try / catch
try {
let result = await readConfig(root);
} catch (e) {
if (e instanceof Error && e.message.includes("subResourceIntegrity")) {
// rewrite future.unstable_subResourceIntegrity -> top-level subResourceIntegrity, retry once
} else throw e;
} Prevention
- Watch stabilization notes: unstable_ flags that stabilize usually relocate to top-level config fields
- Prefer top-level options over future.* flags in new configs; future flags are inherently temporary
- Re-run `react-router typegen` after every upgrade so relocated fields surface in types
When it happens
Trigger: Any config-loading run where `future` contains the `unstable_subResourceIntegrity` key (there is no v8_ alias for this one — only the unstable name is checked).
Common situations: Apps that enabled SRI when it was unstable and upgraded after stabilization; configs written from older docs; the flag being spread into `future` via a shared object.
Related errors
- The `future.v8_viteEnvironmentApi` flag has been removed bec
- The `future.v8_passThroughRequests` flag has been removed be
- The `future.v8_middleware` flag has been removed because mid
- The `future.v8_trailingSlashAwareDataRequests` flag has been
- The `future.v8_splitRouteModules` flag has been moved to a t
AI-assisted analysis of remix-run/react-router@6beaca3952 (2026-08-18).
Data as JSON: /api/errors/d0573d92a1bf4c4e.
Report an issue: GitHub.