erquhartE
Convex Community3y ago
48 replies
erquhart

convex dev 400, schema error

Analyzing and deploying source code...
✖ Error: Unable to push deployment config to <dev-url>
400 Bad Request: Error: Hit an error while pushing:
Uncaught TypeError: Cannot read properties of undefined (reading 'json')


The code it's referencing is from validator.ts - the error is specifically where
v.json
is being asssigned to
fieldType
-
v
is undefined:
  object<T extends PropertyValidators>(schema: T): ObjectValidator<T> {
    return new Validator(
      {
        type: "object",
        value: Object.fromEntries(
          Object.entries(schema).map(([k, v]) => [
            k,
            { fieldType: v.json, optional: v.optional },
          ])
        ),
      },
      false
    );
  },


I've pored over my schema and can't find any undefined values. The only place I can even think of that could cause this is maybe mispelling a table name in
v.id()
, but I'm not even certain that would result in
undefined
.

Pretty stuck here, any help greatly appreciated.
Was this page helpful?