Skip to main content

All Questions

0 votes
1 answer
237 views

Is this the right way to create a Svelte 5 store with two-way binding to a Firebase Realtime db path?

This is how I used to do it in Svelte 4: // $lib/firebase.ts export function writableRealtimeStore<T>() { let unsubscribe: () => void = () => {} let objectRef: any const store = ...
Nikolay Dyankov's user avatar
1 vote
1 answer
103 views

Svelte, Snapshot & Cannot destructure property error

I am creating a Svelte application using Firebase Database and am trying to convert a simple Firebase call to use a Query Snapshot, rather than a Get, so that I can instantly see changes on screen if ...
Yiags1978's user avatar
0 votes
1 answer
272 views

Svelte writable store synced to Firebase Realtime DB

My goal is to create the following: // my-component.svelte <script> import { project } from '$lib/firebase' </script> {#if $project} <p>{$project.name}</p> <...
Nikolay Dyankov's user avatar
0 votes
1 answer
39 views

How can I listen for updates to comments and their replies with firestore?

I have a simple messaging/commenting system where there are top level comments, and replies to that top level comment. I have posts/{id}/comments which has the top level comments. A posts/{id}/...
user1354934's user avatar
  • 8,861
0 votes
1 answer
399 views

Resolving MIME checking for .svelte file when uploading to Firebase

I have been working on a static webpage offline, and it works when I deploy it locally. I have now been trying to upload it to Firebase hosting, and have configured CLI etc. and can run the hosting. ...
M.A.'s user avatar
  • 1
1 vote
0 answers
174 views

SvelteKit & Firebase Auth, Two output files share the same path but have different contents?

I keep getting the error whenever I import import { createUserWithEmailAndPassword } from "firebase/auth"; Two output files share the same path but have different contents: node_modules....
Jardo's user avatar
  • 81
1 vote
1 answer
3k views

Problem When Deploying Sveltekit Project to Vercel

So I Was trying to deploy my Sveltekit app with Vercel but this happened: Cloning completed: 221.226ms Previous build cache not available Using prebuilt build artifacts... Error: Config file was not ...
ΔβΙΧΚαΓ K's user avatar
1 vote
2 answers
967 views

How to display all items from Firestore in Svelte?

Im trying to make a To-do app. I can get all the information from firebase in the console, however the only item I can get to display in the ui is the last one. How can i display all of them? let msg ...
TedoPi4a's user avatar
0 votes
1 answer
203 views

convert firestore data to string to display, in inner html

I Want to display my data in this <p> element but I don't know how. I can get it and then console log it but that's it right now, I got it to display document id but when I go further than that ...
pohadkove's user avatar
2 votes
1 answer
1k views

How can I fix getting the error window is not defined

How can I fix getting the error window is not defined when using firebase in my sveltekit project I cant put it on mount because of other reasons and am trying to get around it? any ideas or is there ...
pohadkove's user avatar
0 votes
1 answer
876 views

how to solve "user.getIdToken() is not a function" error coming from a file I didn't create

So I have a simple project with sveltefire (svelte + firebase). I can sign in, I can sign out and I can create an account. In the component to create an account, I have these lines of code: ...
DWKK's user avatar
  • 61
0 votes
1 answer
371 views

How to sign in a user with email and password with firebase + svelte?

So I have a project using firebase and svelte that should allow me to create a user with email and password, sign in the same way and sign in with google. However, I am having trouble with the second ...
DWKK's user avatar
  • 61
2 votes
2 answers
1k views

Reuse firebase object instance in multiple components

I am playing around with Firebase and Svelte at the moment and wondering about the best way to set up a Firebase app object that I can use from several components. For example, I have two different ...
ErikM's user avatar
  • 83
1 vote
2 answers
637 views

Firebase: how to add auto-generated document id to the document in svelte?

What is the right way to add a firebase document with an auto-generated id in svelte? So far I am using the following code snippet: db.collection('colname').add({ id:'temp', text:'sometext' }).then( ...
emixd's user avatar
  • 49
0 votes
1 answer
494 views

How do I return firestore result in svelte?

How do you get the result from this in svelte into the page: async function getCities(db) { const citiesCol = collection(db, 'cities'); const citySnapshot = await getDocs(citiesCol); const ...
Pål Bergström's user avatar

15 30 50 per page