Skip to content
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

Firebase Admin Version Update #6

Open
anthonycastelli opened this issue Feb 24, 2022 · 2 comments
Open

Firebase Admin Version Update #6

anthonycastelli opened this issue Feb 24, 2022 · 2 comments

Comments

@anthonycastelli
Copy link

anthonycastelli commented Feb 24, 2022

The Firebase Admin SDK is a bit outdated, any chance we can get that bumped up along with the latest version of any other package that needs it?

Running nom outdated is returning all of these

Package                            Current    Wanted   Latest  Location                                       Depended by
@nestjs/cli                          7.6.0     7.6.0    8.2.1  node_modules/@nestjs/cli                       nestjs-firebase-admin
@nestjs/schematics                   7.3.1     7.3.1    8.0.7  node_modules/@nestjs/schematics                nestjs-firebase-admin
@nestjs/testing                     7.6.18    7.6.18    8.3.1  node_modules/@nestjs/testing                   nestjs-firebase-admin
@types/jest                        26.0.24   26.0.24   27.4.1  node_modules/@types/jest                       nestjs-firebase-admin
@types/node                       14.18.12  14.18.12  17.0.21  node_modules/@types/node                       nestjs-firebase-admin
@typescript-eslint/eslint-plugin    4.33.0    4.33.0   5.12.1  node_modules/@typescript-eslint/eslint-plugin  nestjs-firebase-admin
@typescript-eslint/parser           4.33.0    4.33.0   5.12.1  node_modules/@typescript-eslint/parser         nestjs-firebase-admin
eslint                              7.32.0    7.32.0    8.9.0  node_modules/eslint                            nestjs-firebase-admin
eslint-plugin-prettier               3.4.1     3.4.1    4.0.0  node_modules/eslint-plugin-prettier            nestjs-firebase-admin
firebase-admin                      9.12.0    9.12.0   10.0.2  node_modules/firebase-admin                    nestjs-firebase-admin
jest                                26.6.3    26.6.3   27.5.1  node_modules/jest                              nestjs-firebase-admin
ts-jest                             26.5.6    26.5.6   27.1.3  node_modules/ts-jest                           nestjs-firebase-admin
ts-loader                            8.3.0     8.3.0    9.2.6  node_modules/ts-loader                         nestjs-firebase-admin
ts-node                              9.1.1     9.1.1   10.5.0  node_modules/ts-node                           nestjs-firebase-admin
@victorouse
Copy link

+1

I was trying to instantiate a Firestore instance (using firebase-admin@^10.0.2 vs the firebase-admin@^9.6.0 from this package) and it seems using credentials.cert(..) isn't evaluating this instanceof check to true:

https://github.com/firebase/firebase-admin-node/blob/master/src/firestore/firestore-internal.ts#L62

And then subsequently the error from Firestore:

'Failed to initialize Google Cloud Firestore client with the available credentials. Must initialize the SDK with a certificate credential or application default credentials to use Cloud Firestore API.'
...
at getFirestoreOptions (xxx/node_modules/@tfarras/nestjs-firebase-admin/node_modules/firebase-admin/lib/firestore/firestore-internal.js:82:11

But downgrading my firebase-admin to the same as this package fixes this.

@younes0
Copy link

younes0 commented Nov 26, 2022

Because this lib will install its own firebase-admin package (v9).
To avoid it, add to your package.json

  "resolutions": {
    "firebase-admin": "^11.3.0"
  },

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants