Skip to content

[SSR] Setting firestore.settings results in "Function Firestore.settings() requires its first argument to be of type object, but it was: a custom Object object" #116

@lupas

Description

@lupas

When setting firestore.settings in nuxt.config.js, we get the following error message in a Typescript Univerrsal (SSR) Project.

Function Firestore.settings() requires its first argument to be of type object, but it was: a custom Object object

Works without Typescript in SPA mode (no SSR).

Update:
Culprit seems to be Universal Mode. It works on client, but fails on server:

// This works
const fireStore = firebase.firestore()
if (process.client) { //
    fireStore.settings(settings)
}
// This fails
const fireStore = firebase.firestore()
fireStore.settings(settings)

Problem: We want it to work in SSR projects, too, obviously...

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions