Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG]: Turso driver not working with latest ORM package and or drizzle kit or maybe libsql. #2287

Closed
Kainkainkain opened this issue May 10, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@Kainkainkain
Copy link

What version of drizzle-orm are you using?

0.30.10

What version of drizzle-kit are you using?

0.21.0

Describe the Bug

export default {
schema: "./drizzle/schema.ts",
out: "./drizzle/migrations",
driver: "turso", // or "postgresql" or "mysql" - "turso" doesnt work
dbCredentials: {
url: process.env.TURSO_DATABASE_URL,
authToken: process.env.TURSO_AUTH_TOKEN,
},
} satisfies Config;

results in this in terminal:
bunx drizzle-kit generate
drizzle-kit: v0.21.0
drizzle-orm: v0.30.10

No config path provided, using default 'drizzle.config.ts'
Reading config file '/abc/drizzle.config.ts'
_ZodError: [
{
"expected": "'postgresql' | 'mysql' | 'sqlite'",
"received": "undefined",
"code": "invalid_type",
"path": [
"dialect"
],
"message": "Required"
}
]
at get error [as error] (/abc/node_modules/drizzle-kit/bin.cjs:2122:28)
at drizzleConfigFromFile (/abc/node_modules/drizzle-kit/bin.cjs:14853:27)
at async prepareGenerateConfig (/abc/node_modules/drizzle-kit/bin.cjs:14467:31)
at async Command. (/abc/node_modules/drizzle-kit/bin.cjs:114251:18) {
issues: [
{
expected: "'postgresql' | 'mysql' | 'sqlite'",
received: 'undefined',
code: 'invalid_type',
path: [Array],
message: 'Required'
}
],
addIssue: [Function (anonymous)],
addIssues: [Function (anonymous)],
errors: [
{
expected: "'postgresql' | 'mysql' | 'sqlite'",
received: 'undefined',
code: 'invalid_type',
path: [Array],
message: 'Required'
}
]
}
Missing required params

Expected behavior

for it to work

I changed back to old version and it works.

"dependencies": {
"@libsql/client": "^0.5.2",
"@types/imap-simple": "^4.2.9",
"drizzle-orm": "^0.29.4",
"hono": "^4.2.8"
},
"devDependencies": {
"@types/bun": "latest",
"dotenv": "^16.4.5",
"drizzle-kit": "^0.20.14"
}

Environment & setup

No response

@Kainkainkain Kainkainkain added the bug Something isn't working label May 10, 2024
@AndriiSherman
Copy link
Member

Please provide dialect: "sqlite" to your config file

https://orm.drizzle.team/kit-docs/config-reference#dialect

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants