Upgrade Errors

Use this as a triage table after upgrading to Astro 7.

Build Fails On .astro Markup

Likely cause: the Rust compiler is stricter than the old Go compiler.

Check for:

  • unclosed component tags
  • unclosed HTML tags
  • invalid nesting like <div> inside <p>
  • unterminated attributes

Fix the markup. Do not look for a compiler flag to restore the old behavior.

Text Lost Spaces Between Inline Elements

Likely cause: compressHTML now defaults to 'jsx'.

<!-- Risky if you expected a visible space from the newline -->
<span>Hello</span>
<span>world</span>

<!-- Clear -->
<span>Hello</span> <span>world</span>

Temporary fallback:

import { defineConfig } from 'astro/config';

export default defineConfig({
  compressHTML: true,
});

Markdown Plugins Stopped Working

Likely cause: Sätteri is now the default processor and unified plugins are not compatible as-is.

Quick unblock:

npm install @astrojs/markdown-remark
import { defineConfig } from 'astro/config';
import { unified } from '@astrojs/markdown-remark';

export default defineConfig({
  markdown: {
    processor: unified(),
  },
});

Astro Treats src/fetch.ts Differently

Likely cause: src/fetch.ts is now the advanced routing entrypoint.

If that file is not meant for routing, rename it or configure:

import { defineConfig } from 'astro/config';

export default defineConfig({
  fetchFile: null,
});

@astrojs/db No Longer Works

Astro DB was removed. Replace it with a database library that matches your runtime:

  • Node node:sqlite for simple Node adapter SQLite use cases
  • Drizzle if you wanted the schema/query shape
  • a hosted database client for Turso, Neon, PlanetScale, Supabase, etc.

Route Caching Throws Or Does Nothing

Check the mode and provider:

  • no provider configured: cache.invalidate() throws
  • dev mode: cache operations are no-ops
  • Cloudflare CDN provider: requires private beta Workers Cache support
  • path invalidation: exact path only, not globs

Vite Or Plugin Errors

If the error mentions Vite, Rolldown, Oxc, esbuild, Rollup, CommonJS, or a custom plugin, read Vite’s migration guide. Normal Astro pages are less likely to need Vite-specific fixes than custom build tooling.