Hi all,
Not exactly sure what I’ve done wrong, but I’ve broken the something in the deploy pipeline and am unable to publish our app.
I’ve narrowed it down to the yarn rw data-migrate up command which returns the below error (thrown in the rw package’s cli code).
It’s happening both locally, and in vercel.
At first glance it looks like it might be a type generation issue with the db, but, yarn rw g types
runs without a hitch?
The rW_DataMigration
table (or at the very least its type) isn’t being consumed?
Anyone have any ideas as to what I might have done wrong, and how to trace it back?
TypeError: Cannot read properties of undefined (reading 'findMany')
at getPendingDataMigrations (/home/devlinux/devlinux/monsteraa/node_modules/@redwoodjs/cli-data-migrate/dist/commands/upHandler.js:154:55)
at handler (/home/devlinux/devlinux/monsteraa/node_modules/@redwoodjs/cli-data-migrate/dist/commands/upHandler.js:72:39)
at Object.handler (/home/devlinux/devlinux/monsteraa/node_modules/@redwoodjs/cli-data-migrate/dist/commands/up.js:61:9)
at runYargs (/home/devlinux/devlinux/monsteraa/node_modules/@redwoodjs/cli/dist/index.js:187:3)
at /home/devlinux/devlinux/monsteraa/node_modules/@redwoodjs/cli/dist/index.js:138:7
at main (/home/devlinux/devlinux/monsteraa/node_modules/@redwoodjs/cli/dist/index.js:119:3)
so at this line:
const ranDataMigrations = await db.rW_DataMigration.findMany(
{
orderBy: { version: "asc" }
}
);