👋 Intro
BrainByteZ has been upgraded to Astro 6. 🚀
The upgrade process went almost flawless. One vite build warning and one astro dev error needs to be resolved.
Update:
I decided to rollback to Astro 5.18.1 until the astro dev error is fixed.
The error is fixed by applying the following changes: Upgrade to Astro 6 - Astro Dev Error - Issue Comment
1️⃣ Step 1: Run -> bunx @astrojs/upgrade
astro Integration upgrade in progress.
@astrojs/check is up to date on v0.9.9
@astrojs/rss is up to date on v4.0.18
@astrojs/sitemap is up to date on v3.7.3
astro will be updated from v5.18.2 to v6.4.6
@astrojs/mdx will be updated from v4.3.14 to v6.0.3
wait Some packages have breaking changes. Continue?
Yes
check Be sure to follow the CHANGELOGs.
astro Upgrade to Astro v6
@astrojs/mdx CHANGELOG
Installing dependencies with bun...
Houston:
Can't wait to see what you build.
2️⃣ Step 2: Run -> bunx zod-v3-to-v4
Let's migrate Zod from v3 to v4
Where is your tsconfig.json?
tsconfig.json
All files have been migrated.
You're all set!
This changed the zod import statement as described in the Astro 6 upgrade docs.
import { z } from "astro/zod";
Update: I discovered that there is also an error when running astro dev with bun run dev after visiting the web-server in the browser.
[ERROR] [vite] Internal server error: Failed to resolve import “@vite/env” from “node_modules/astro/node_modules/vite/dist/client/client.mjs”. Does the file exist?
[ERROR] [vite] Internal server error: Failed to resolve import "@vite/env" from "node_modules/astro/node_modules/vite/dist/client/client.mjs". Does the file exist?
Plugin: vite:import-analysis
File: node_modules/astro/node_modules/vite/dist/client/client.mjs:1:8
1 | import "@vite/env";
| ^
Update:
For now I decided to rollback to Astro 5.18.1 until the astro dev error is fixed.
The error is fixed by applying the following changes: Upgrade to Astro 6 - Astro Dev Error - Issue Comment