Skip to content

fix: upgrade @astrojs/sitemap to 3.7.1 to resolve Astro 6 build failure#879

Closed
Copilot wants to merge 4 commits intomainfrom
copilot/fix-astro-build-issues
Closed

fix: upgrade @astrojs/sitemap to 3.7.1 to resolve Astro 6 build failure#879
Copilot wants to merge 4 commits intomainfrom
copilot/fix-astro-build-issues

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Mar 20, 2026

Astro 6's prerender chunks emit import * as z from 'zod/v4' at runtime. With @astrojs/sitemap@3.7.0 installed, the top-level node_modules/zod resolved to 3.25.76, whose /v4 subpath exports function from the core layer (not the classic wrapper) — so z.function() instances lack .optional(), causing the build to abort during static route generation.

Changes

  • package.json: bump @astrojs/sitemap from ^3.7.0^3.7.1
  • package-lock.json: regenerated; top-level zod now resolves to 4.3.6 (promoted by @astrojs/sitemap@3.7.1's updated peer dep zod@^4.3.6)

@astrojs/sitemap@3.7.1 also migrates its own schema to the Zod v4 API, replacing the now-removed .args()/.returns() with the v4 { input, output } object form:

// 3.7.0 (Zod v3 API — breaks under zod@4.x)
filter: z.function().args(z.string()).returns(z.boolean()).optional()

// 3.7.1 (Zod v4 API)
filter: z.function({ input: [z.string()], output: z.boolean() }).optional()

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • fonts.googleapis.com
    • Triggering command: /home/REDACTED/work/_temp/ghcca-node/node/bin/node node ./node_modules/.bin/astro build git conf�� get --global k/_temp/ghcca-node/node/bin/bash credential.helpenpm (dns block)
  • www.npmjs.com
    • Triggering command: /home/REDACTED/work/_temp/ghcca-node/node/bin/node /home/REDACTED/work/_temp/ghcca-node/node/bin/node --enable-source-maps /home/REDACTED/work/_temp/copilot-developer-action-main/dist/index.js (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

Original prompt

I've updated to Astro version 6, which has caused my site to no longer build. There are experimental features that need to be changed/removed. Please fix them, and ensure that both the GitHub pages workflow run and pass and the dockerbuild workflow.


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

…ate Node.js to v22

Co-authored-by: willtheorangeguy <18339050+willtheorangeguy@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix build issues after update to Astro version 6 Fix Astro 6 compatibility: remove stale experimental flag and bump Node.js to 22 Mar 20, 2026
Copilot AI requested a review from willtheorangeguy March 20, 2026 02:59
Copilot AI and others added 2 commits March 20, 2026 03:27
Co-authored-by: willtheorangeguy <18339050+willtheorangeguy@users.noreply.github.com>
Co-authored-by: willtheorangeguy <18339050+willtheorangeguy@users.noreply.github.com>
Copilot AI changed the title Fix Astro 6 compatibility: remove stale experimental flag and bump Node.js to 22 fix: upgrade @astrojs/sitemap to 3.7.1 to resolve Astro 6 build failure Mar 20, 2026
Copilot AI requested a review from willtheorangeguy March 20, 2026 04:03
@willtheorangeguy willtheorangeguy deleted the copilot/fix-astro-build-issues branch March 24, 2026 13:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants