svelte-adapter-firebase icon indicating copy to clipboard operation
svelte-adapter-firebase copied to clipboard

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

Open kleber-swf opened this issue 2 years ago • 1 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

kleber-swf avatar Dec 26 '22 12:12 kleber-swf

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",

symbolicsorcerer avatar Jul 15 '23 14:07 symbolicsorcerer