Firebase-js-sdk: TypeError: Object(...) is not a function when updating to v7.17.0 from v7.16.1

Created on 24 Jul 2020  路  7Comments  路  Source: firebase/firebase-js-sdk

[REQUIRED] Describe your environment

  • Operating System version: Mac OS Mojave 10.14.6 (18G6020)
  • Browser version: Google Chrome 84.0.4147.89
  • Firebase SDK version: 7.17.0
  • Firebase Product: initializing, remote config, analytics

[REQUIRED] Describe the problem

Steps to reproduce:

Happens when the application attempts to initialize with firebase.initializeApp

Renovate auto-merged a version bump from 7.16.1 to 7.17.0 and this error started occurring. Everything was working before the version bump 馃憤

Relevant Code:


https://stackblitz.com/fork/firebase-issue-sandbox

firebase.initializeApp(require('path-to-config'));

const analytics = firebase.analytics(); // stack trace points to this being the failure

Stack trace of error running locally (same error occurs in production)

Screen Shot 2020-07-23 at 8 26 13 PM

analytics

Most helpful comment

Sorry! I think this is caused by us not publishing the @firebase/util package which has changes needed to go along with the analytics change. I will try to get that package published quickly.

In the meantime, please roll back if you can and sorry for the error.

All 7 comments

I couldn't figure out how to label this issue, so I've labeled it for a human to triage. Hang tight.

Sorry! I think this is caused by us not publishing the @firebase/util package which has changes needed to go along with the analytics change. I will try to get that package published quickly.

In the meantime, please roll back if you can and sorry for the error.

No problem. Already did to verify this was the culprit 馃憤 thanks for the speedy response!

Just published 7.17.1 which includes the missing package. The release notes will be a little delayed.

Thanks for publishing the update!

For anyone else that is still having the error after upgrading to 7.17.1, I also had to delete the node_modules and reinstall dependencies. Worked like a charm after that.

Thanks for publishing the update!

For anyone else that is still having the error after upgrading to 7.17.1, I also had to delete the node_modules and reinstall dependencies. Worked like a charm after that.

in my case it didn't work error is still their

1) What was the latest version that works for you before it broke? Did 7.16.1 work?
2) Have you tried removing your yarn.lock or package-lock.json file before reinstalling?

Was this page helpful?
0 / 5 - 0 ratings