jacob-8 / sveltefirets Goto Github PK
View Code? Open in Web Editor NEWFirebase ❤️ Svelte: A SvelteKit + Typescript + Firebase library inspired by Fireship.io
Home Page: https://sveltefirets.vercel.app/
License: MIT License
Firebase ❤️ Svelte: A SvelteKit + Typescript + Firebase library inspired by Fireship.io
Home Page: https://sveltefirets.vercel.app/
License: MIT License
When I push to the main branch with a new package version, I would GitHub actions to publish the new version, but I get this error upon the action running npm ci
:
npm ERR! code ENOENT
npm ERR! syscall open
npm ERR! path /home/runner/work/sveltefirets/sveltefirets/node_modules/sveltefirets/node_modules/sveltefirets/package.json
npm ERR! errno -2
npm ERR! enoent ENOENT: no such file or directory, open '/home/runner/work/sveltefirets/sveltefirets/node_modules/sveltefirets/node_modules/sveltefirets/package.json'
npm ERR! enoent This is related to npm not being able to find a file.
I know it has to do with how I'm referring to sveltefirets
as "sveltefirets": "file:./package",
in my package.json
but don't know to fix. I have set it up this way so after my changes to my package I can run 'npm run package' and Vite automatically updates my demo app. Anyone know how to help me with this?
Hi,
is it normal that PUBLIC_FIREBASE_CONFIG is visible in the website sources when deployed in production?
Isn't it a security issue?
In your 0-FirebaseUI-for-web example there is
{#if $user}
User authenticated
{:else}
{LoginComponent}
{/if}
With this example when loading the page it show the {LoginComponent} until the $user
is populated.
google_screen_recording_2022-10-22T13-01_02.118Z.webm (second 00:04 of the video)
As the $user
variable result null
if not authenticated, is there a simple way to handle the loading state of the $user
variable to show a loader until $user
finish loading (either result null or the user object)?
(I tried using {#await ...}
but without success)
Might be as simple as the dep in package.json
I understand this code let you access Firestore collections as stores (observables), right? Isn't that what RxFire does?
Am I missing something here?
Also, I don't get the OnLine
methods. What are they for? I thought Firestore handled the offline case transparently for the developer.
When clicking the Load firestore data for all messages server-side I receive a few different errors: Service firestore is not available
or QueryLimitConstraint is not a constructor
or The "path" argument must be of type string or an instance of URL. Received undefined
and when clicking the Messages API endpoint link in the demo app I receive the same. The error varies based on what piece of Firebase/Firestore is needed first (and also possibly the state of the Vercel hot/cold server instance?). Firebase imports simply don't exist server side when deployed to Vercel.
If you pull down the code you'll find that everything works as expected when running npm run dev
and also works great if you npm run build
and npm run preview
. Something gets lost when deployed to Vercel and I don't understand how to fix it.
The same problems are exhibited in https://github.com/jacobbowdoin/jia-you that imports the sveltefirets
package from npm and is not just an internal link. See the Service firestore is not available
error when trying to export my characters using this link.
@benmccann do you have any ideas for me? I could post this issue in the Vercel adapter but didn't know if it belongs there. This is my last hurdle to solve before I'm able to have a great server+client experience. As seen in src\routes\[messageId].svelte
I'm able to use const message = await getDocument<IMessage>(
messages/${params.messageId}, firebaseApp);
to fetch a document using Firestore's REST api server side and also load it client side from the Firestore cache if a user has already loaded the document. For me that's a big win to be able to do both of those with one line. The same goes for collections.
In KitchenSink, when clicking in "Preload firestore data for all messages in the client" link (or any other that uses api/messages) there is an error: Not found: /messages
Noticed it is using 'get' instead of 'GET'.
Hi,
I would like to ask/understand, if there is a major difference in features offered by your lib, comparated to this one:
https://firelordjs.com/
Thanks you,
Sorry for the non issue.
I just took a look at the documentation and is very well made.
I would suggest to add a donation button so people can support your work. Keep it up!
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.