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

Upgrade @firebase/database (and possibly other @firebase/ dependencies) #1241

Closed
rhodgkins opened this issue Apr 28, 2021 · 3 comments · Fixed by #1250
Closed

Upgrade @firebase/database (and possibly other @firebase/ dependencies) #1241

rhodgkins opened this issue Apr 28, 2021 · 3 comments · Fixed by #1250
Assignees

Comments

@rhodgkins
Copy link

"@firebase/database": "^0.8.1",

Currently the @firebase/database dependency is limited to ^0.8.1 but there have been a few releases since then - mainly the new Query#startAfter and Query#endBefore methods added in 0.9.X.

I've tried upgrading yarn add firebase-admin@latest and also yarn upgrade and not getting a later @firebase/database version than 0.8.3 - but that does make sense as ^0.8.1 will only allow patch updates on the 0.8.X line...

@google-oss-bot
Copy link

I found a few problems with this issue:

  • I couldn't figure out how to label this issue, so I've labeled it for a human to triage. Hang tight.
  • This issue does not seem to follow the issue template. Make sure you provide all the required information.

@0xdevalias
Copy link

0xdevalias commented May 6, 2021

I believe this may also be the root cause of the issue we are seeing in our app (see sparkletown/sparkle#1362 (comment)), trying to use the latest firebase (8.5.0) with the latest firebase-admin (8.7.0).

See the linked comment for more specific details, but at a high level, it seems as though [email protected] requires a 1.x version of @firebase/util and [email protected] requires a 0.x version of @firebase/util. So having them together in the same package leads to issues.


This leads to the following warnings when installing the packages:

By default:

npm WARN @firebase/[email protected] requires a peer of @firebase/[email protected] but none is installed. You must install peer dependencies yourself.
npm WARN @firebase/[email protected] requires a peer of @firebase/[email protected] but none is installed. You must install peer dependencies yourself.
npm WARN @firebase/[email protected] requires a peer of @firebase/[email protected] but none is installed. You must install peer dependencies yourself.

If I manually install npm i @firebase/[email protected]:

npm WARN @firebase/[email protected] requires a peer of @firebase/[email protected] but none is installed. You must install peer dependencies yourself.

We can see the issue with npm ls @firebase/util:

⇒  npm ls @firebase/util
[email protected] /Users/devalias/dev/sparkle/sparkle
├── @firebase/[email protected]
├─┬ [email protected]
│ ├─┬ @firebase/[email protected]
│ │ ├─┬ @firebase/[email protected]
│ │ │ └── @firebase/[email protected]  deduped
│ │ └── @firebase/[email protected]
│ ├─┬ @firebase/[email protected]
│ │ ├─┬ @firebase/[email protected]
│ │ │ └── @firebase/[email protected]  deduped
│ │ └── @firebase/[email protected]
│ ├─┬ @firebase/[email protected]
│ │ ├─┬ @firebase/[email protected]
│ │ │ └── @firebase/[email protected]  deduped
│ │ └── @firebase/[email protected]  deduped
│ ├─┬ @firebase/[email protected]
│ │ ├─┬ @firebase/[email protected]
│ │ │ └── @firebase/[email protected]  deduped
│ │ └── @firebase/[email protected]
│ ├─┬ @firebase/[email protected]
│ │ └─┬ @firebase/[email protected]
│ │   └── @firebase/[email protected]
│ ├─┬ @firebase/[email protected]
│ │ ├─┬ @firebase/[email protected]
│ │ │ └── @firebase/[email protected]  deduped
│ │ └── @firebase/[email protected]
│ ├─┬ @firebase/[email protected]
│ │ ├─┬ @firebase/[email protected]
│ │ │ └── @firebase/[email protected]  deduped
│ │ └── @firebase/[email protected]
│ ├─┬ @firebase/[email protected]
│ │ ├─┬ @firebase/[email protected]
│ │ │ └── @firebase/[email protected]  deduped
│ │ └── @firebase/[email protected]
│ ├─┬ @firebase/[email protected]
│ │ ├─┬ @firebase/[email protected]
│ │ │ └── @firebase/[email protected]  deduped
│ │ └── @firebase/[email protected]
│ ├─┬ @firebase/[email protected]
│ │ ├─┬ @firebase/[email protected]
│ │ │ └── @firebase/[email protected]  deduped
│ │ └── @firebase/[email protected]
│ └── @firebase/[email protected]
└─┬ [email protected]
  └─┬ @firebase/[email protected]
    ├─┬ @firebase/[email protected]
    │ └── @firebase/[email protected]
    └── UNMET PEER DEPENDENCY @firebase/[email protected]

npm ERR! peer dep missing: @firebase/[email protected], required by @firebase/[email protected]

I also stumbled across the following StackOverflow while trying to resolve this, and it sounds like trying to use firebase + firebase-tools can have similar version incompatibility issues:


Edit: Ping @Feiyang1 (#614 (comment) made it sound like you're a good person to ping from the JS SDK team for this)

@0xdevalias
Copy link

0xdevalias commented May 6, 2021

Potentially related: #973 (comment)

We can fix every package except for @firebase/database. Fixing it for @firebase/database will bring #614 back.

I'm pondering if we should add @firebase/app(-type) back to @firebase/database's peerDependencies as it also breaks our compatibility with Yarn2 in the JS SDK repo. see firebase/firebase-js-sdk#3707

The downside is admin SDK users will start seeing #614 again. Maybe we should talk about creating a @firebase/database-standalone package again, as the workaround in place seems to start causing compatibility issues with newer tools.

Originally posted by @Feiyang1 in #973 (comment)

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

Successfully merging a pull request may close this issue.

4 participants