withastro/astro · warning

The injected route " " by specifies the entry point with…

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.

Solutions

  1. If it is your integration, rename the key: injectRoute({ pattern, entrypoint: '...' })
  2. If third-party, upgrade to a release using entrypoint, or open an issue/PR upstream
  3. 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

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


AI-assisted analysis of withastro/astro@52e6c34790 (2026-08-18). Data as JSON: /api/errors/45d9e848fa3fd7fe. Report an issue: GitHub.

Appendix: 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)