Deploying an Astro app to Cloudflare Pages

I am setting up a new Astro app. This is the steps taken so far...

1. Run npm create cloudflare@latest -- mysite --framework=astro --platform=pages

In the Astro install, I didn't initialize a repo and I just installed the "Minimal empty template"

2. I then manually created the repo and pushed to GitHub the root of the folder the Astro installer created. So repo looks like this...

.gitignore
.vscode
astro.config.mjs
node_modules
package-lock.json
package.json
public
README.md
src
tsconfig.json
worker-configuration.d.ts
wrangler.jsonc

3. In Cloudflare I created a new Pages app and pointed it at the repo. It successfully connected, but then errored during build. The attachment shows the error...

What's going on? It seems Cloudflare doesn't like some of the dependencies. I'm doing the initial build on macOS. Do I need to update my local npm environment?
Was this page helpful?