zhest
zhest
DTDrizzle Team
Created by zhest on 11/8/2023 in #help
Migration Failed LibsqlError
I had migrated prior, done a lot of schema work, and then did a drizzle-generate, worked fine and I migrated, but got the following error.
Migration failed
LibsqlError: SQL_NO_STATEMENT: SQL string does not contain any statement
...
code: 'SQL_NO_STATEMENT',
[cause]: [ResponseError: SQL string does not contain any statement] {
code: 'SQL_NO_STATEMENT',
proto: {
message: 'SQL string does not contain any statement',
code: 'SQL_NO_STATEMENT'
}
}
}
 ELIFECYCLE  Command failed with exit code 1.
Migration failed
LibsqlError: SQL_NO_STATEMENT: SQL string does not contain any statement
...
code: 'SQL_NO_STATEMENT',
[cause]: [ResponseError: SQL string does not contain any statement] {
code: 'SQL_NO_STATEMENT',
proto: {
message: 'SQL string does not contain any statement',
code: 'SQL_NO_STATEMENT'
}
}
}
 ELIFECYCLE  Command failed with exit code 1.
Above is from the migration script.
main().catch((e) => {
console.error('Migration failed');
console.error(e);
process.exit(1);
});
main().catch((e) => {
console.error('Migration failed');
console.error(e);
process.exit(1);
});
Additionally, when I try to do push via drizzle-kit, I get the following:
Error: Cannot find module 'better-sqlite3'
Error: Cannot find module 'better-sqlite3'
However, I am using Turso, so my migration script uses libsql, and importing as such.
import { drizzle } from 'drizzle-orm/libsql';
import { drizzle } from 'drizzle-orm/libsql';
I can not really get past this error and only found it after doing a lot of schema.ts work. Is my only course of action to backtrack my schema.ts file and see where the issue is or is there an easier way to trouble shoot migration errors that I am not familiar with?
14 replies