#`Cannot read properties of undefined (reading '_zod')` build error

10 messages · Page 1 of 1 (latest)

tough parrot
#

I am running build for Startlight template on GitHubActions and is getting this error. However, when I am building locally, I was able to successfully build the site without any errors. I am wondering what might be going wrong in my case. Here is the repo.

last glacier
#

Astro and Starlight do not support zod 4, that's probably the reason

tough parrot
#

It builds locally, it is only not working for github actions

last glacier
#

starlight doesn't have zod as a peer dep but astro does

#

Your stacktrace clearly shows zod 4 is being used, are you sure your lockfile is up date and/or frozen when installing deps on netlify?

tough parrot
last glacier
#

Yeah that could, package manager things

#

Try to install latest zod 3 in the starlight project

tough parrot