Using Drizzle as a package in Turborepo doesn't work ?
I have a monorepo (Turborepo) with a shared package called @mono/database in which I put my drizzle schema and my types.
I'm testing a query on an app of this monorepo (a simple Node.js folder with TS files), and I also run the exact same query (with the same exact drizzle client definition) from my package to test it out. The thing is: the query works perfectly when ran from my package but outputs an error when run from my app that uses the content of the package.
When I run the query from my package directly, the logger it outputs the beautiful SQL statement complete with all the tables and fields.
But when I run it from my app (the Node.js folder with TS files) I get the following weird statement;
Which returns me the error below
------------------------------------------------
I logged the
But when I copy / pasted the corresponding
Here is the
Any idea ? So that means the bundling in the turborepo process might be creating the error ?
I'm testing a query on an app of this monorepo (a simple Node.js folder with TS files), and I also run the exact same query (with the same exact drizzle client definition) from my package to test it out. The thing is: the query works perfectly when ran from my package but outputs an error when run from my app that uses the content of the package.
When I run the query from my package directly, the logger it outputs the beautiful SQL statement complete with all the tables and fields.
But when I run it from my app (the Node.js folder with TS files) I get the following weird statement;
Which returns me the error below
------------------------------------------------
I logged the
client in both cases, and also the tables which outputted, for both, the exact object of 750 lines.But when I copy / pasted the corresponding
pgTable directly in the file of my app in which I was importing my tables from the package and it works with no errors.Here is the
package.json of my @mono/database package.Any idea ? So that means the bundling in the turborepo process might be creating the error ?