tursodatabase / tursodatabase/libsql
Having trouble syncing in Nuxt3 – Embedded Syncs works with Nuxt x Vercel?
Open
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
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- 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