Vuefire: Invalid value for option "firebase": expected an Object, but got Function.

Created on 14 Oct 2017  路  13Comments  路  Source: vuejs/vuefire

It seems that after the upgrade to the latest Vue and Vuefire version, Firebase can not be used with the Function call. I use this all the time, because of the ability of passing a value in the 'where clause', callback function (for setting loading status and in some cases performing data manipulation).

Created a new project using the latest vue-cli (2.9.1), moved my source of an existing project to this new project to check what I have to change/improve.

versions

"firebase": "^4.5.1",
"vue": "^2.4.2",
"vue-router": "^2.7.0",
"vuefire": "^1.4.4"
"vue-loader": "^13.0.4",
"vue-style-loader": "^3.0.1",
"vue-template-compiler": "^2.4.2",
"webpack": "^3.6.0",

Error (after upgrade)

image

Is this a bug?

enhancement

Most helpful comment

Uh... Already wasted few hours with this error and in final found this issue, hope it will be fixed in near future.

All 13 comments

It's a false alarm. You can use a function for the firebase property. The warning shouldn't appear

I created a new clean project and imported Firebase and VueFire.
No luck, got the error. As soon as I do the 'normal' call, no error occurs.
Please tell me that you don't have the same issue.

image

image

Don't worry about the error, it will work 馃檪

Hey @posva , Even though this still works, can it (or will it) be fixed to prevent unnecessary warnings in the console. Or...can we actually pass an object instead of a function?

Objects and functions both work. Don't mind the error, it should be removed in the future

Uh... Already wasted few hours with this error and in final found this issue, hope it will be fixed in near future.

@posva
Can you please let us know when this issue will be fixed?

Just subscribe to the issue and you'll be notified when the issue is fixed 馃槈

I'm getting blocked by this warning when using the firestore branch. It seems when the firestore property is a function, it is never executed.

@dylancarlone it should be working but I may have not released it yet. Can you try building it yourself?

@posva any chance you'll be releasing it soon? I'm having the hardest time setting up the branch locally. Thanks for such a quick response!

@dylancarlone I actually did, I think 2 hours ago 馃槅
That's weird, it should as easy as npm i && npm run build but you should be able to test with the latest release

My mistake, I should have checked the releases first. Everything is working great. Thank you very much!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

JFGHT picture JFGHT  路  5Comments

torfeld6 picture torfeld6  路  4Comments

rstormsf picture rstormsf  路  4Comments

franciscolourenco picture franciscolourenco  路  7Comments

calirails picture calirails  路  5Comments