When installing my packages with yarn, I get:
[2/2] Regenerating lockfile and installing missing dependencies...
info [email protected]: The platform "linux" is incompatible with this module.
info "[email protected]" is an optional dependency and failed compatibility check. Excluding it from installation.
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]".
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/auth > @firebase/[email protected]" has unmet peer dependency "@firebase/[email protected]".
warning "firebase > @firebase/database > @firebase/[email protected]" has unmet peer dependency "@firebase/[email protected]".
warning "firebase > @firebase/firestore > @firebase/[email protected]" has unmet peer dependency "@firebase/[email protected]".
warning "firebase > @firebase/functions > @firebase/[email protected]" has unmet peer dependency "@firebase/[email protected]".
warning "firebase > @firebase/storage > @firebase/[email protected]" has unmet peer dependency "@firebase/[email protected]".
warning " > [email protected]" has incorrect peer dependency "babel-plugin-root-import@^5.1.0".
Maybe related: #752, #388
Doesn't seem to have any bad effect on the product. And since we're installing firebase instead of @firebase/auth and other required components, I don't think this is an issue related to my environment.
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.
@Feiyang1 for reference, please add link to that known bug in yarn if possible.. for me I can never just leave a warning unless I have confirmation and have tracking on the issue :)
There you go, https://github.com/yarnpkg/yarn/issues/5347
Yarn thinks it's working as expected, so I doubt it will get fixed. It won't be a problem in our use case, since "@firebase/[email protected]" is a dependency of "@firebase/app" which is always required.
Well.. one could just install the types and be gone with it :D
yarn add @firebase/[email protected] --dev
So if it isn't Yarn's fault, this issue should be reopened
I'd also say that's not solved. The "more obvious" solution would be to remove "@firebase/[email protected]" as peerDependency and add it as normal dependency?
This is biting me as well. The warnings look dangerous even though my app is working fine.
@Feiyang1 Is there a reason you can't move the peerDependencies causing this issue to dependencies? That's the consensus at Yarn.
Most helpful comment
@Feiyang1 Is there a reason you can't move the peerDependencies causing this issue to dependencies? That's the consensus at Yarn.
https://github.com/yarnpkg/yarn/issues/5347