TypeError: b.build is not a function
at C:\Users\twj19\source\repos\personal\widgetboard-backend\widgetboard-backend\node_modules\drizzle-dbml-generator\dist\index.cjs:180:72
at Array.map (<anonymous>)
at PgGenerator.generateTable (C:\Users\twj19\source\repos\personal\widgetboard-backend\widgetboard-backend\node_modules\drizzle-dbml-generator\dist\index.cjs:180:59)
at PgGenerator.generate (C:\Users\twj19\source\repos\personal\widgetboard-backend\widgetboard-backend\node_modules\drizzle-dbml-generator\dist\index.cjs:315:35)
at pgGenerate (C:\Users\twj19\source\repos\personal\widgetboard-backend\widgetboard-backend\node_modules\drizzle-dbml-generator\dist\index.cjs:359:68)
at <anonymous> (c:\Users\twj19\source\repos\personal\widgetboard-backend\widgetboard-backend\src\db\dbml.ts:5:1)
at ModuleJob.run (node:internal/modules/esm/module_job:192:25)
at async CustomizedModuleLoader.import (node:internal/modules/esm/loader:246:24)
at async loadESM (node:internal/process/esm_loader:40:7)
at async handleMainPromise (node:internal/modules/run_main:66:12)
Node.js v20.3.1`
import * as schema from './schema';
import { pgGenerate } from "drizzle-dbml-generator";
pgGenerate({ schema, out: './schema.dbml', relational: true })
console.log("✅ Created the schema.dbml file");
console.log("⏳ Creating the erd.svg file");
I have this strange error on this line in the library:
I'm using the following versions:
And my code using tsx: