-
Notifications
You must be signed in to change notification settings - Fork 12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Problem when deploying on vercel: firebase-admin "Dynamic require of "fs" is not supported" #26
Comments
Hello, thanks for your support and trying it out yourself! My three shots in the dark regarding this are... 1. Node version?Are you using & deploying to Node 16? Vercel recently added this! It will auto-deploy to Node 16 if you put an "engines" key in your https://github.com/jmagrippis/with-svelte/blob/main/package.json#L52 I'd consider using a tool like Volta to pin down the version for local development tool, in case you ain't using one already! And then the usual, 2. Env Vars?Any chance you didn't add the Firebase Admin environment variables in the Vercel dashboard? I know I did that wrong many times (which is why I added that error-throwing sanity check 😅) 3. adapter-vercel version?As it sometimes happens with SvelteKit, there are some deployment problems with the most recent vercel-adapter version... So, yeah, those are my shots in the dark 😅 I assume the app works just fine locally? How about if you build and serve the build output locally? ( Let me know how this goes! |
I want to thank you for your very detailed answer! Yesterday evening I had time to debug everything again and actually found the error.
Thanks again for your great videos. I think it was the first time I really understood the possibilities of svelte-kit. It definitely inspired me and I will dive deeper into svelte-kit. Keep up the great videos! |
Great to hear 🥳 |
Thanks for your great work!
I have tried to implement the magic link in a project of mine, after watching your video. But during the deployment, I ran into an error. I wonder if you did something else or have an idea of what is going wrong.
I am using exactly the same version of
firebase-admin
, I have tried to copy the completefirebase/admin.ts
it's exactly the same.The text was updated successfully, but these errors were encountered: