9

On the phase where yarn is linking its dependencies I get the following block of warnings:

warning "firebase > @firebase/[email protected]" has unmet peer dependency "@firebase/[email protected]".  
warning "firebase > @firebase/[email protected]" has unmet peer dependency "@firebase/[email protected]".  
warning "firebase > @firebase/[email protected]" has unmet peer dependency "@firebase/[email protected]".
...

some more unment peer dependency warnings about "@firebase/[email protected]" from different firebase packages I removed here for the sake of better readability.

...  
warning " > [email protected]" has unmet peer dependency "dom-tools@^0.1.1".  
warning " > [email protected]" has unmet peer dependency "wolfy87-eventemitter@^4.3.0".  

Even though I did read The docs about dependency types, I still do not understand:

1) What are peer dependencies? [now I do... please read edit below]
2) Why and how are they used? [now I do... please read edit below]

This lack of understanding also leads to me being uncertain about what I should do about those warnings provided by yarn.

3) Should I add @firebase/[email protected], dom-tools@^0.1.1 and wolfy87-eventemitter@^4.3.0 as dependencies?
4) if so then should those be normal or dev dependencies?

Edit:
It was suggested that this is a duplicate of Why use peer dependencies in npm for plugins? so I went and read it. I now understand better what peer dependencies are in general and I do recommend everyone reaching this Q that does no understand what peer dependencies are to go ahead and read said Question and answer provided there.

Never the less, I still don't know how to resolve said warning and Q's 3 and 4 are still let unanswered for me.

I do understand that @firebase/[email protected] expects me to somhow use that code in @firebase/[email protected] when communicating with it... but I do not knwo where, when am I how I am expected to do so.

The fact that I don't use it could mean that its something optional that I don't actually need and this makes it "an implementation detail" (to use language from https://stackoverflow.com/a/34645112/25412 ) or that I am missing something in how I am using @firebase/[email protected].

I am not asking about the peer dependencies of plotjs because plotjs is not something that I am using directly to begin with so I am guessin the first option of an optional "implementation detail" applies here (at least for now).

So maybe someone can provide more insight into what @firebase/[email protected] does and how and when it can/should be used?

2

1 Answer 1

10

According to one of the collaborators maintaining the firebase javascript sdk, this warning is generated by a known bug in yarn. See this related issue in the firebase-js-sdk:

After a quick google search, It appears to be a known issue with yarn. If a peer dependency is installed by a dependency's dependency (I know it's a mouthful), yarn will complain about it. Your product is totally safe, there is nothing to worry about. You can also use npm install instead, and there is no warning.

In conclusion: ignore the "@firebase/..." has unmet peer dependency "@firebase/[email protected]". warnings.

Sign up to request clarification or add additional context in comments.

2 Comments

Do you have a link to this known bug?
@Mackelito see the linked firebase-js-sdk issue for more info.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.