jthegedus / svelte-adapter-firebase

SvelteKit adapter for Firebase Hosting rewrites to Cloud Functions for a Svelte SSR experience

Home Page:https://github.com/jthegedus/svelte-adapter-firebase

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

bug: The default firestore.json file generates an array of functions

kleber-swf opened this issue · comments

Describe the Bug

Firebase 11.19.0 (dec/2022): running firebase init with functions setup generates the following snippet:

"functions": [
   {
      "source": "functions",
      "codebase": "default",
      "ignore": ["node_modules", ".git", "firebase-debug.log", "firebase-debug.*.log"]
   }
],
...

which is an array. The adapter expects an object.

Steps to Reproduce

  1. run firebase init and make sure you selected to setup firebase functions
  2. run npm run build
  3. The following error will throw: Error: Required "functions.source" field is missing from Firebase Configuration file.

Expected Behaviour

The adapter should accept this default configuration. Probably this will be the default to now on.

svelte-adapter-firebase version

0.14.4

sveltejs/kit version

1.0.1

The fix is in main but not released. As a workaround in the meantime for folks, you can update package.json:

		"svelte-adapter-firebase": "git://github.com/jthegedus/svelte-adapter-firebase.git#a18d29b",