withastro/astro · warning
The injected route "${injectRoute.pattern}" by ${integration
Error message
The injected route "${injectRoute.pattern}" by ${integration.name} specifies the entry point with the "entryPoint" property. This property is deprecated, please use "entrypoint" instead. What it means
In the astro:config:setup hook, integrations register server routes via injectRoute({ pattern, entrypoint }). The object still tolerates the legacy entryPoint (capital P) key: when entrypoint is absent but entryPoint is present, Astro warns (aimed at the integration author), copies the value into entrypoint, and registers the route anyway.
Source
Thrown at packages/astro/src/integrations/hooks.ts:259
astroJSXRenderer = renderer;
} else {
updatedSettings.renderers.push(renderer);
}
},
injectScript: (stage, content) => {
updatedSettings.scripts.push({ stage, content });
},
updateConfig: (newConfig) => {
// Logger destination is updated later because it's async
if (newConfig.logger?.entrypoint) {
isLoggerUpdated = true;
}
updatedConfig = mergeConfig(updatedConfig, newConfig);
return { ...updatedConfig };
},
injectRoute: (injectRoute) => {
if (injectRoute.entrypoint == null && 'entryPoint' in injectRoute) {
logger.warn(
null,
`The injected route "${injectRoute.pattern}" by ${integration.name} specifies the entry point with the "entryPoint" property. This property is deprecated, please use "entrypoint" instead.`,
);
injectRoute.entrypoint = injectRoute.entryPoint as string;
}
updatedSettings.injectedRoutes.push({ ...injectRoute, origin: 'external' });
},
addWatchFile: (path) => {
updatedSettings.watchFiles.push(path instanceof URL ? fileURLToPath(path) : path);
},
addDevToolbarApp: (entrypoint) => {
updatedSettings.devToolbarApps.push(entrypoint);
},
addClientDirective: ({ name, entrypoint }) => {
if (updatedSettings.clientDirectives.has(name) || addedClientDirectives.has(name)) {
throw new Error(
`The "${integration.name}" integration is trying to add the "${name}" client directive, but it already exists.`,
);View on GitHub (pinned to 52e6c34790)
Solutions
- If it is your integration, rename the key: injectRoute({ pattern, entrypoint: '...' })
- If third-party, upgrade to a release using entrypoint, or open an issue/PR upstream
- No functional action required — the route still registers; the fix is purely to silence the deprecation
Example fix
// integration — before
injectRoute({ pattern: '/admin', entryPoint: 'src/routes/admin.ts' });
// after
injectRoute({ pattern: '/admin', entrypoint: 'src/routes/admin.ts' }); Defensive patterns
Strategy: type-guard
Validate before calling
function usesLegacyKey(r: { entrypoint?: unknown } & Record<string, unknown>): boolean {
return r.entrypoint == null && 'entryPoint' in r;
}
// in your integration's setup hook, assert !usesLegacyKey(route) before injectRoute Type guard
type LegacyInjectRoute = { pattern: string; entryPoint: string };
function isLegacyInjectRoute(
r: { entrypoint?: unknown } & Record<string, unknown>
): r is LegacyInjectRoute {
return r.entrypoint == null && 'entryPoint' in r;
} Prevention
- Use the lowercase entrypoint key in all injectRoute calls
- Type injectRoute arguments against Astro's integration types so legacy keys fail typecheck
- Upgrade community integrations that still log this warning, or patch them upstream
When it happens
Trigger: An integration (dependency or in-repo plugin) calls injectRoute({ pattern: '/x', entryPoint: 'src/x.ts' }) — entrypoint is null/undefined and 'entryPoint' is present in the object.
Common situations: Older community integrations not yet migrated to the lowercase key; in-house integrations written before the rename; warnings appearing in user logs even though the injected route keeps working.
Related errors
- Auto-generating collections for folders in "src/content/" t
- Integration "${maybeConflictingIntegration}" conflicts with
- Integration ${colors.bold(integrationName)} is injecting a t
- Integration ${colors.bold(integration.name)} has an unnamed
- Renderer ${colors.bold(renderer.name)} does not provide a se
AI-assisted analysis of withastro/astro@52e6c34790 (2026-08-18).
Data as JSON: /api/errors/45d9e848fa3fd7fe.
Report an issue: GitHub.