motzM
Convex Community3mo ago
15 replies
motz

Type error after upgrading to Convex 1.29 from 1.27

In my Next.js 16 project using Convex, after having updated to Convex 1.29.0 and successfully running bun convex dev, when wanting to build the Next.js project, the following type error occurs on every single instance of useQuery, prefetchQuery, fetchQuery, etc.

./src/app/host/[code]/host.tsx:20:30
Type error: Type '{ _type: "query"; _visibility: "public"; _args: { code: string; }; }' does not satisfy the constraint 'FunctionReference<"query">'.
  Type '{ _type: "query"; _visibility: "public"; _args: { code: string; }; }' is missing the following properties from type 'FunctionReference<"query">': _returnType, _componentPath

  18 | }: {
  19 |     roomId: Id<"rooms">
> 20 |     preloadedRoom: Preloaded<typeof api.rooms.getRoomByCode>
     |                              ^
  21 | }) {
  22 |     /*
  23 |      * QUERIES
Next.js build worker exited with code: 1 and signal: null
error: script "build" exited with code 1
Was this page helpful?