tursodatabase / tursodatabase/libsql-client-ts

LibsqlError: URL_SCHEME_NOT_SUPPORTED: The client that uses Web standard APIs supports only "libsql:", "wss:", "ws:", "https:" and "http:" URLs, got "file:".

Open
#290 1 comment 8 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
576
Forks
69
PR merge metrics
No merged PRs in 30d

Description

It seems that the libsql not working in nextjs15 and middleware(edge runtime).

the sample code not working in nextjs15 and edge runtime:

const tursoClient = createClient({
  url: `file:local.db`,
  syncInterval: 60,
  syncUrl: process.env.TURSO_DATABASE_URL,
  authToken: process.env.TURSO_AUTH_TOKEN,
});

It gives the error LibsqlError: URL_SCHEME_NOT_SUPPORTED: The client that uses Web standard APIs supports only "libsql:", "wss:", "ws:", "https:" and "http:" URLs, got "file:".

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the createClient configuration shown in the issue and inspect how the Web standard API handles the file: URL in Next.js 15 middleware or the edge runtime. Reproduce the error with the sample configuration and determine whether the expected outcome is support for local file URLs or clearer runtime guidance; the issue does not name a file or test to update.

Written by the indexing model from the issue text.

Assessment

Tech stack
next.js, sqlite, typescript
Domain
api, backend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.