#Starlight 0.17.3 build error

12 messages · Page 1 of 1 (latest)

azure geyser
#

Hey Support - I just ran Astro upgrade on a starlight site I’m working on and after the upgrade I get this error when running build. I didn’t make any changes to the config (or anything else really).

src/content/config.ts:5:27 - error ts(2322): Type '(context: SchemaContext) => z.ZodIntersection<z.ZodObject<{ title: z.ZodString; description: z.ZodOptional<z.ZodString>; editUrl: z.ZodDefault<z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodBoolean]>>>; ... 9 more ...; pagefind: z.ZodDefault<...>; }, "strip", z.ZodTypeAny, { ...; }, { ...; }>, z.AnyZodObject> | z.ZodIn...' is not assignable to type 'BaseSchema | ((context: SchemaContext) => BaseSchema) | ((context: SchemaContext) => BaseSchema) | undefined'.
Type '(context: SchemaContext) => z.ZodIntersection<z.ZodObject<{ title: z.ZodString; description: z.ZodOptional<z.ZodString>; editUrl: z.ZodDefault<z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodBoolean]>>>; ... 9 more ...; pagefind: z.ZodDefault<...>; }, "strip", z.ZodTypeAny, { ...; }, { ...; }>, z.AnyZodObject> | z.ZodIn...' is not assignable to type '(context: SchemaContext) => BaseSchema'.

5 docs: defineCollection({ schema: docsSchema() }),
~~~~~~

I tried deleting the node modules and reinstalling.. I’m not sure what else to try 🤷🏼‍♂️. Any ideas are very much appreciated! Thank you!

random flax
#

Did you also upgrade your @astrojs/starlight version? Which versions are you using?

azure geyser
#

I was on 0.17.2 then ran npx <@&1055234544183287879>/upgrade. It ran fine but after it’s throwing the build error. I’ve been running Astro upgrade each time there’s a release. It’s now on Astro 4.3.3 and starlight 0.17.3.. it all worked perfectly on 4.3.2 and 0.17.2.

dense abyss
#

can confirm the build error

Astro                    v4.3.3
Node                     v20.10.0
System                   Windows (x64)
Package Manager          pnpm
Output                   static
Adapter                  none
Integrations             @astrojs/starlight
#

starlight version: 0.17.3 as Duuke mentioned above

foggy lintel
#

CC @lilac aurora @maiden mulch as I believe you worked on content collection type related features in the recent releases

lilac aurora
#

Thanks! We also have a GitHub issue and I'm investigating

maiden mulch
#

Thanks for the ping!

lilac aurora
#

Not really sure I see right away how this changed caused this. Are you able to take a look @maiden mulch?

maiden mulch
#

Not now but I'll have a look in a few hours for sure

azure geyser
#

Thanks for taking a look everyone!