tursodatabase / tursodatabase/libsql

Having trouble syncing in Nuxt3 – Embedded Syncs works with Nuxt x Vercel?

Open
#1,689 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C
Stars
17.2k
Forks
531
Avg merge
1h 12m
Merged PRs (30d)
1

Description

I've cloned, tested and deploy Nuxt3 to Vercel with this repo: https://github.com/tursodatabase/examples/tree/master/app-top-web-frameworks

Everything works well with remote DB and when I tried to embed the db locally, the replica.db seems like it's empty.

May I know did I missed out any steps?

// server/utils/turso.ts
import { createClient } from "@libsql/client";

export function useTurso() {
  const tursoConfig = useRuntimeConfig().turso;

  if (!tursoConfig.dbUrl || !tursoConfig.dbAuthToken) {
    throw new Error(
      "Please fill the NUXT_TURSO_DB_URL and NUXT_TURSO_DB_AUTH_TOKEN env variables"
    );
  }
  return createClient({
    url : "file:dbs/replica.db",
    syncUrl: tursoConfig.dbUrl,
    authToken: tursoConfig.dbAuthToken,
  });
}
`

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 server/utils/turso.ts and reproduce the Nuxt3 deployment from the app-top-web-frameworks example on Vercel. Check the embedded replica.db configuration and sync behavior; done means the local replica is populated and embedded sync works in the deployment.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, nuxtjs, sqlite
Domain
backend, database
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.