steamcleaner
steamcleaner
BABetter Auth
Created by steamcleaner on 3/15/2025 in #bug-reports
Error: invalid column data type undefined - when running generate migration
Error running the cli generate. In addition to diagnosing, I think the error logging should be clearer here. What column? better-auth 1.2.4
% npx @better-auth/cli@latest generate
⠋ preparing schema...file:///dir/.npm/_npx/05eee8cc65087e98/node_modules/kysely/dist/esm/parser/data-type-parser.js:11
throw new Error(`invalid column data type ${JSON.stringify(dataType)}`);
^

Error: invalid column data type undefined
at parseDataTypeExpression (file:///dir/.npm/_npx/05eee8cc65087e98/node_modules/kysely/dist/esm/parser/data-type-parser.js:11:11)
at CreateTableBuilder.addColumn (file:///dir/.npm/_npx/05eee8cc65087e98/node_modules/kysely/dist/esm/schema/create-table-builder.js:121:105)
at getMigrations (file:///dir/.npm/_npx/05eee8cc65087e98/node_modules/better-auth/dist/shared/better-auth.67eSHmUo.mjs:1094:19)
at process.processTicksAndRejections (node:internal/process/task_queues:105:5)
at async generateMigrations (file:///dir/.npm/_npx/05eee8cc65087e98/node_modules/@better-auth/cli/dist/index.mjs:608:33)
at async Command.generateAction (file:///dir/.npm/_npx/05eee8cc65087e98/node_modules/@better-auth/cli/dist/index.mjs:658:18)
% npx @better-auth/cli@latest generate
⠋ preparing schema...file:///dir/.npm/_npx/05eee8cc65087e98/node_modules/kysely/dist/esm/parser/data-type-parser.js:11
throw new Error(`invalid column data type ${JSON.stringify(dataType)}`);
^

Error: invalid column data type undefined
at parseDataTypeExpression (file:///dir/.npm/_npx/05eee8cc65087e98/node_modules/kysely/dist/esm/parser/data-type-parser.js:11:11)
at CreateTableBuilder.addColumn (file:///dir/.npm/_npx/05eee8cc65087e98/node_modules/kysely/dist/esm/schema/create-table-builder.js:121:105)
at getMigrations (file:///dir/.npm/_npx/05eee8cc65087e98/node_modules/better-auth/dist/shared/better-auth.67eSHmUo.mjs:1094:19)
at process.processTicksAndRejections (node:internal/process/task_queues:105:5)
at async generateMigrations (file:///dir/.npm/_npx/05eee8cc65087e98/node_modules/@better-auth/cli/dist/index.mjs:608:33)
at async Command.generateAction (file:///dir/.npm/_npx/05eee8cc65087e98/node_modules/@better-auth/cli/dist/index.mjs:658:18)
4 replies