I have a Next.js application using Drizzle ORM and a Turso database. While I can easily connect to the Turso database from localhost, when deployed on Vercel, I encounter the error: LibsqlError: SERVER_ERROR: Server returned HTTP status 401.
Next.js: 14.2.11
Drizzle ORM: 0.33.0
@libsql/client: 0.11.0
I’ve tried everything to fix this: recreating the database, regenerating the auth token, and even hardcoding the database URL and auth token directly into the code (bypassing the use of environment variables). Nothing has worked.
I have a Next.js application using Drizzle ORM and a Turso database. While I can easily connect to the Turso database from localhost, when deployed on Vercel, I encounter the error: LibsqlError: SERVER_ERROR: Server returned HTTP status 401.
I’ve tried everything to fix this: recreating the database, regenerating the auth token, and even hardcoding the database URL and auth token directly into the code (bypassing the use of environment variables). Nothing has worked.