Skip to content

Admin catch-all route /_emdash/admin/[...path] returns 404 for all sub-paths #369

@diegoesolorzano

Description

@diegoesolorzano

Description

The admin SPA catch-all route /_emdash/admin/[...path] is registered in the Astro manifest during build but returns 404 for ALL sub-paths (/setup, /login, /content, etc.).

API routes under /_emdash/api/* work correctly (return 401/200).

Environment

  • Emdash: 0.1.0
  • Astro: 6.1.4
  • Node: 24.13.1
  • OS: macOS ARM64
  • Tested with both @astrojs/cloudflare and @astrojs/node adapters — same result

Steps to Reproduce

  1. Create project from marketing-cloudflare template
  2. Run npx emdash init && npx emdash seed seed/seed.json
  3. Run npx emdash dev --port 4321
  4. Visit http://localhost:4321/_emdash/admin
  5. Get redirected to /_emdash/admin/setup (correct)
  6. /_emdash/admin/setup returns 404 (broken)

Investigation

  • The route IS in the build manifest with correct pattern /_emdash/admin/[...path] and component path to admin.astro
  • The admin.astro file exists and resolves correctly via require.resolve('emdash/routes/admin.astro')
  • The setup middleware correctly redirects to /setup when no users exist
  • API routes injected the same way work perfectly
  • Creating a manual src/pages/admin/[...path].astro also returns 404 — this might be an Astro 6 issue with catch-all routes in injected paths

Expected Behavior

/_emdash/admin/setup should render the admin SPA shell (admin.astro).

Workaround

None found. The admin panel is completely inaccessible.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions