error: role "vscode" does not exist

vscode ➜ /workspaces/nethys/controlplane (master) $ bunx @better-auth/cli@latest generate
⠋ preparing schema.../workspaces/nethys/node_modules/pg-pool/index.js:45
    Error.captureStackTrace(err)
          ^

error: role "vscode" does not exist
    at /workspaces/nethys/node_modules/pg-pool/index.js:45:11
    at process.processTicksAndRejections (node:internal/process/task_queues:105:5)
    at async PostgresDriver.acquireConnection (file:///tmp/bunx-1000-@better-auth/cli@latest/node_modules/kysely/dist/esm/dialect/postgres/postgres-driver.js:21:24)
    at async RuntimeDriver.acquireConnection (file:///tmp/bunx-1000-@better-auth/cli@latest/node_modules/kysely/dist/esm/driver/runtime-driver.js:44:28)
    at async DefaultConnectionProvider.provideConnection (file:///tmp/bunx-1000-@better-auth/cli@latest/node_modules/kysely/dist/esm/driver/default-connection-provider.js:8:28)
    at async DefaultQueryExecutor.executeQuery (file:///tmp/bunx-1000-@better-auth/cli@latest/node_modules/kysely/dist/esm/query-executor/query-executor-base.js:34:16)
    at async SelectQueryBuilderImpl.execute (file:///tmp/bunx-1000-@better-auth/cli@latest/node_modules/kysely/dist/esm/query-builder/select-query-builder.js:317:24)
    at async PostgresIntrospector.getTables (file:///tmp/bunx-1000-@better-auth/cli@latest/node_modules/kysely/dist/esm/dialect/postgres/postgres-introspector.js:61:28)
    at async getMigrations (file:///tmp/bunx-1000-@better-auth/cli@latest/node_modules/better-auth/dist/shared/better-auth.XjdOGtZf.mjs:995:25)
    at async generateMigrations (file:///tmp/bunx-1000-@better-auth/cli@latest/node_modules/@better-auth/cli/dist/index.mjs:703:33) {
  length: 98,
  severity: 'FATAL',
  code: '28000',
  detail: undefined,
  hint: undefined,
  position: undefined,
  internalPosition: undefined,
  internalQuery: undefined,
  where: undefined,
  schema: undefined,
  table: undefined,
  column: undefined,
  dataType: undefined,
  constraint: undefined,
  file: 'miscinit.c',
  line: '703',
  routine: 'InitializeSessionUserId'
}

Node.js v22.15.1


I'm looking for either a different way to create a db schema for better-auth (i'm using kysely) or some way to fix this issue
Solution
pass your db like this
Was this page helpful?