astro
Astro Error Codes
Named error codes thrown by the Astro build tool and runtime, covering routing, content collections, images, client directives, and rendering. Each code corresponds to a documented entry in Astro's error reference.
12 codes
references docs.astro.build/en/reference/error-reference/github.com/withastro/astro/blob/main/packages/astro/src/core/errors/errors-data.ts
· All codes 12 codes
- ClientAddressNotAvailable Client Address Not Available `Astro.clientAddress` was accessed in an adapter that doesn't support reading the requesting client's IP address, so the value can't be provided.
- GetStaticPathsExpectedParams getStaticPaths Expected Params A route object returned from `getStaticPaths()` is missing the required `params` property, so Astro doesn't know which URL the generated page should map to.
- GetStaticPathsInvalidRouteParam getStaticPaths Invalid Route Param A `params` value returned from `getStaticPaths()` has an invalid type. Route parameters must be strings (or `undefined` for optional params) — numbers, objects, and other types aren't allowed.
- GetStaticPathsRequired getStaticPaths Required A dynamic route (e.g. `[slug].astro`) is missing the required `getStaticPaths()` export. In static (non-SSR) output mode, every dynamic route must export this function so Astro knows which pages to generate at build time.
- ImageMissingAlt Image Missing Alt An `<Image />` or `<Picture />` component is missing the required `alt` property. Alt text is required for accessibility — pass a descriptive string, or `alt=""` for purely decorative images.
- MissingImageDimension Missing Image Dimension A remote image passed to `<Image />` is missing a required `width` or `height` attribute. Astro can read dimensions automatically for local images, but remote images need them specified explicitly to avoid layout shift.
- MissingMediaQueryDirective Missing Media Query Directive The `client:media` hydration directive was used without providing a media query string, e.g. `client:media`. It must be given a value such as `client:media="(max-width: 50em)"` so Astro knows when to hydrate the component.
- NoClientOnlyHint No client:only Hint A `client:only` directive was used without specifying which renderer to use, e.g. `client:only` instead of `client:only="react"`. Astro can't render the component on the server, so it needs the hint to know which framework to hydrate it with on the client.
- NoMatchingRenderer No Matching Renderer Astro could not find a UI framework renderer (React, Vue, Svelte, etc.) able to render a given component. Usually means the matching `@astrojs/*` integration isn't installed or added to the Astro config.
- RenderUndefinedEntryError Render Undefined Entry Error `render()` was called on a content collection entry that is `undefined`, typically because `getEntry()` or `getEntryBySlug()` couldn't find a matching entry. Check that the referenced entry actually exists in the collection.
- ReservedSlotName Reserved Slot Name A `<slot>` was given a name that conflicts with a name reserved internally by Astro (such as `default`'s framework-specific equivalents), so the slot can't be created as written.
- StaticClientAddressNotAvailable Static Client Address Not Available `Astro.clientAddress` was accessed on a page that is prerendered to static HTML. Client IP addresses are only available on pages that are server-rendered on demand, since prerendered pages have no associated request.