engineering

1 min read

How to fix `cannot read properties of undefined (reading 'columns…

Written By

QI

Qing

Creator, Quotion

Published on

1/13/2024

Drizzle is a popular ORM for TS/JS applications, and Quotion is built on it.

The error

I have encountered the cannot read properties of undefined (reading 'columns') error quite a few times, as shown below:

CleanShot 2024-01-13 at 16.38.04@2x_fa6f5b

The solution

The error message isn’t very helpful, and the root cause may be that you have forgotten to export some tables as a schema, especially when you use folders to save table files, you created a new table but forgot to export it as schema.

The fix is quite simple: you just need to export all your database tables as the schema, and this issue should be gone.

Hope it resolves your errors as well. 🙏

engineering

Create your blogs directly from Apple Notes.

Say goodbye to complex CMS updates and management issues!

You focus on creating quality content while Quotion takes care of the rest.

Latest

More from the blog