Open nicholaschiang opened 4 years ago
Temporary fix is to use the packageExtensions
config in .yarnrc.yml
(see docs):
"@firebase/database@0.x":
peerDependencies:
"@firebase/app-types": "0.x"
"@firebase/auth@0.x":
peerDependencies:
"@firebase/app-types": "0.x"
"@firebase/util": "0.x"
Once I did that, I got a warning about firebase-admin
:
➤ YN0002: │ firebase-admin@npm:9.0.0 doesn't provide @firebase/app-types@0.x requested by @firebase/database@npm:0.6.9
So, I added that to the packageExtensions
as well:
firebase-admin@9.0.x:
dependencies:
"@firebase/app-types": "0.x"
And it looks fine now.
None of the above action items can be addressed in this repo. Is there anything that needs to be done in this codebase?
@Feiyang1 what do you think of the above?
We can fix every package except for @firebase/database
. Fixing it for @firebase/database
will bring https://github.com/firebase/firebase-admin-node/issues/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 https://github.com/firebase/firebase-js-sdk/issues/3707
The downside is admin SDK users will start seeing https://github.com/firebase/firebase-admin-node/issues/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.
@hiranya911 @Feiyang1 Any update on this yet? I'm still seeing these warnings...
FYI: https://github.com/firebase/firebase-admin-node/issues/1241 / https://github.com/firebase/firebase-admin-node/pull/1250 were opened recently about upgrading @firebase/database
and similar dependencies, which may potentially resolve the issues here when merged?
Seems still not fixed yet. Using pnpm here.
Will this be addressed?
So when I install the latest version of firebase-admin
with Yarn2 into a new project, this is the only dependency warning I get:
➤ YN0000: ┌ Resolution step
➤ YN0002: │ @firebase/database@npm:0.13.10 doesn't provide @firebase/app-types (pc007b), requested by @firebase/auth-interop-types
➤ YN0000: │ Some peer dependencies are incorrectly met; run yarn explain peer-requirements <hash> for details, where <hash> is the six-letter p-prefixed code
➤ YN0000: └ Completed in 2s 679ms
Is anyone seeing additional warnings about additional packages? I just want to make sure I have a full list of the problem packages to fix, and the specific packages the warnings are about seem to have changed since the original 2020 post at the top.
In addition to spot-fixing any problem packages, we're also looking into a more comprehensive solution to prevent issues like this in the future.
Note to self: The warning above can be fixed by removing the peerDependencies
in auth-interop-types: https://github.com/firebase/firebase-js-sdk/blob/f2923228a9725b330ad6da21073bb2fdbb263027/packages/auth-interop-types/package.json#L15 I don't think they belong there at all and I suspect they are a copy-paste error way back when the package was created.
any updates on this?
[REQUIRED] Describe your environment
[REQUIRED] Describe the problem
This doesn't support Yarn v2 because some of the
@firebase
packages don't provide their dependent's peer dependencies (e.g.@firebase/auth
doesn't provide@firebase/util
which is requested by@firebase/auth-types
).You should:
@firebase/app-types
as a peer dependency to@firebase/database
and@firebase/auth
@firebase/util
as a peer dependency to@firebase/auth
Steps to reproduce:
develop
and fetch the latest changes:@firebase/database
and@firebase/auth
not providing their dependency's peer dependencies: