FlowiseAI/Flowise · critical · Error
No datasource options provided
Error message
No datasource options provided
What it means
SQLite analog of errors 261/266 but with no port guard. Thrown by SQLiteRecordManager.getDataSource when config.sqliteOptions is falsy. SQLite needs at least a database file path; without options, TypeORM cannot construct the DataSource.
Source
Thrown at packages/components/nodes/recordmanager/SQLiteRecordManager/SQLiteRecordManager.ts:173
tableName: string
namespace: string
config: SQLiteRecordManagerOptions
constructor(namespace: string, config: SQLiteRecordManagerOptions) {
const { tableName } = config
this.namespace = namespace
this.tableName = tableName || 'upsertion_records'
this.config = config
}
sanitizeTableName(tableName: string): string {
return sanitizeRecordManagerTableName(tableName)
}
private async getDataSource(): Promise<DataSource> {
const { sqliteOptions } = this.config
if (!sqliteOptions) {
throw new Error('No datasource options provided')
}
const dataSource = new DataSource(sqliteOptions)
await dataSource.initialize()
return dataSource
}
async createSchema(): Promise<void> {
const dataSource = await this.getDataSource()
try {
const queryRunner = dataSource.createQueryRunner()
const tableName = this.sanitizeTableName(this.tableName)
await queryRunner.manager.query(`
CREATE TABLE IF NOT EXISTS "${tableName}" (
uuid TEXT PRIMARY KEY DEFAULT (lower(hex(randomblob(16)))),
key TEXT NOT NULL,
namespace TEXT NOT NULL,
updated_at REAL NOT NULL,View on GitHub (pinned to abe4a8601a)
Solutions
- Supply sqliteOptions: { database: '/path/to/database.sqlite', type: 'sqlite' }.
- Set DATABASE_PATH env var so the default resolves to a writable directory.
- Confirm the credential / additionalConfig JSON parsed (a parse error throws earlier) and includes the database path.
Example fix
// before
const mgr = new SQLiteRecordManager({ tableName: 'records' }, {})
// after
const mgr = new SQLiteRecordManager(
{ tableName: 'records' },
{ sqliteOptions: { type: 'sqlite', database: '/data/flowise.sqlite' } }
) Defensive patterns
Strategy: validation
Validate before calling
function hasSqliteOptions(cfg: unknown): cfg is { sqliteOptions: { database: string } } {
const o = (cfg as any)?.sqliteOptions
return !!o && typeof o.database === 'string' && o.database.length > 0
}
if (!hasSqliteOptions(config)) {
throw new Error('sqliteOptions.database path is required.')
} Type guard
function isSqliteConfig(cfg: unknown): cfg is { sqliteOptions: { type: 'sqlite'; database: string } } {
const o = (cfg as any)?.sqliteOptions
return !!o && o.type === 'sqlite' && typeof o.database === 'string'
} Try / catch
try {
await manager.createSchema()
} catch (e) {
if (e instanceof Error && e.message === 'No datasource options provided') {
// prompt for sqlite database path or DATABASE_PATH env
}
throw e
} Prevention
- Set DATABASE_PATH to a writable directory in production.
- In Docker, mount a volume for the SQLite file.
- Validate the database path is writable before starting ingestion.
When it happens
Trigger: Config object omits sqliteOptions; the init path's validateSQLitePath / mergeDataSourceOptions produced nothing assigned to sqliteOptions; programmatic construction forgot the options argument.
Common situations: Record Manager node has no SQLite configuration filled; DATABASE_PATH env var unset and getUserHome() unreachable so the default path invalid - though that path throws elsewhere; misnamed key in additionalConfig.
Related errors
- No datasource options provided
- No datasource options provided
- Invalid JSON in the Additional Configuration: ${exception}
- Invalid JSON in the Additional Configuration:
- Invalid table name
AI-assisted analysis of FlowiseAI/Flowise@abe4a8601a (2026-08-12).
Data as JSON: /api/errors/29661ae41dde1921.
Report an issue: GitHub.