You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Attempting to run drizzle-kit push on a local sqlite3 db fails... because my project also has @libsql/client installed.
I have both better-sqlite3 and @libsql/client packages installed... as I want to be able to run dev locally or remotely... as well as push locally or remotely. I have different npm scripts that set up a DB_ENV variable to control how the config operates (see config file below).
Inspecting the code in the connectToSQLite function - it will attempt to create a libsql client based on the presence of the @libsql/client package... and so my url field ends up being treated as a real url, rather than my local db location path, and so parseUri fails with LibsqlError: URL_INVALID: The URL is not in a valid format.
In this case, it seems that checking for the presence of a specific library being installed is a somewhat poor proxy for deciding what to do. Would it be better to drive things more directly from config settings, rather than by checking which package(s) are installed?
Attempting to run
drizzle-kit push
on a local sqlite3 db fails... because my project also has@libsql/client
installed.I have both
better-sqlite3
and@libsql/client
packages installed... as I want to be able to run dev locally or remotely... as well as push locally or remotely. I have different npm scripts that set up aDB_ENV
variable to control how the config operates (see config file below).Inspecting the code in the
connectToSQLite
function - it will attempt to create a libsql client based on the presence of the@libsql/client
package... and so my url field ends up being treated as a real url, rather than my local db location path, and soparseUri
fails withLibsqlError: URL_INVALID: The URL is not in a valid format
.In this case, it seems that checking for the presence of a specific library being installed is a somewhat poor proxy for deciding what to do. Would it be better to drive things more directly from config settings, rather than by checking which package(s) are installed?
versions:
My
drizzle.config.ts
:The text was updated successfully, but these errors were encountered: