Astro is a modern site builder with web best practices, performance, and developer experience at the forefront. The current stable version is 6.1.8, and it receives frequent patch updates with major versions typically released on an annual or bi-annual cadence.
npm install astroVerified import paths — ran on the pinned version, not inferred.
This `astro.config.ts` example demonstrates how to configure an Astro project, including adding an integration like React and setting the site URL. It showcases the use of `defineConfig` for type-safe configuration.
Upgrade your Node.js environment to version 22.12.0 or newer. Check your hosting and CI environments.
Migrate to `import.meta.glob()` for dynamic file imports. This Vite-powered API offers similar functionality but with differences in return type and static analysis limitations.
Review the Zod v4 migration guide and update your schemas as needed.
Migrate any existing legacy content collections to the Content Layer API introduced in Astro v5.0.
Move client-side code to a `<script>` tag outside the frontmatter, or use client directives (`client:load`, `client:idle`, `client:visible`, `client:media`, `client:only`) on framework components to ensure code runs in the browser.
Add the framework identifier as the value for `client:only`, such as `<MyReactComponent client:only="react" />`.
Upgrade Node.js to version 22.12.0 or newer.
Ensure all environment variables being accessed are defined and are of the expected type (string). For older Astro versions, certain characters in `.env` could cause issues; update Astro to the latest patch.
Move the code that accesses browser APIs into a `<script>` tag in an `.astro` component, or apply a client directive (e.g., `client:load`, `client:only`) to your UI framework component to defer its execution to the client.
Verify the package is installed (`npm install X`). Check the import path for typos. Delete `node_modules` and `package-lock.json` (or equivalent) and reinstall dependencies. Consult the Astro documentation for known incompatible packages.
Ensure the glob pattern accurately reflects the file paths. `import.meta.glob()` requires static string literals. For dynamic paths, import a larger set of files and then filter them, or manually construct imports if the set is small and known.
No dependency data recorded yet.