Closed alexfung888 closed 9 months ago
This issue does not seem to follow the issue template. Make sure you provide all the required information.
This issue does not seem to follow the issue template. Make sure you provide all the required information.
Fixed
Good find, we'll get that patched up.
I should try to get it so we don't have two package.json files, if i can't achieve that without a big refactor I'll add unit tests to make sure the deps match.
I'm a little bit confused on what I should do to install Angular Fire being that this makes it fail.
The easiest fix would be not to have firebase-tools in your package.json, rather use a globally installed firebase-tools or use NPX. We generally recommend you don't have firebase-tools in your package.json, since it's a very large dependency & is shrinkwrapped, increasing the likelihood of a version conflict.
The easiest fix would be not to have firebase-tools in your package.json, rather use a globally installed firebase-tools or use NPX. We generally recommend you don't have firebase-tools in your package.json, since it's a very large dependency & is shrinkwrapped, increasing the likelihood of a version conflict.
yarn does not have global any more.
If I use dlx, it seems to me that yarn would be downloading and binding the firebase-tools afresh everytime, taking quite a while to execute.
Why do you have firebase-tools as peerDependencies? Especially with a fixed version? I have ng16 and have to use v16, but I can't use latest firebase-tools in my repo (which is 13 at the moment).
Why do you have firebase-tools as peerDependencies? Especially with a fixed version? I have ng16 and have to use v16, but I can't use latest firebase-tools in my repo (which is 13 at the moment).
@egorkel-altexsoft I need to issue firebase commands, and I didn't want install firebase-tools as global (and now yarn does not have global at all). Ins't that what devdep means? They are tools I need for the development cycle.
Ok, what should I do if I have to use version 16 and need the latest fb-tools? Now I have: @angular/core: 16 @angular/fire: 16 And as a dev dependency firebase-tools: 12 (I can't use 13 because of conflicts with @angular/fire peer dependency)
Ok, what should I do if I have to use version 16 and need the latest fb-tools? Now I have: @angular/core: 16 @angular/fire: 16 And as a dev dependency firebase-tools: 12 (I can't use 13 because of conflicts with @angular/fire peer dependency)
Ignore the peer dependency. As raised in this issue, the firebase-tools have dependency on both ^12 and ^13.
Version 16 has only one fb tools version ^12. And I can't ignore peer dependency in my CI. When I run npm ci
it fails.
Anyway, for now I rolled back to fb tools 12. But it's not a good idea to restrict both ng and fb tools versions. They are not related and have different development cycle. Or you have to support older ng version, i. g. v16.0.1 to allow both 12 and 13 fb tools.
Version 16 has only one fb tools version ^12. And I can't ignore peer dependency in my CI. When I run
npm ci
it fails. Anyway, for now I rolled back to fb tools 12. But it's not a good idea to restrict both ng and fb tools versions. They are not related and have different development cycle. Or you have to support older ng version, i. g. v16.0.1 to allow both 12 and 13 fb tools.
Please read the issue I raised. https://github.com/angular/angularfire/blob/master/package.json
says
"dependencies": {
"firebase-tools": "^13.0.0"
},
I raised the issue because https://github.com/angular/angularfire/blob/master/src/package.json
is wrong.
If your CI cannot accept peer dependency conflict, then you really need to use npm global
or yarn dlx
without adding firebase-tools
to your repository.
Version info
Angular: 17.0.7
Firebase: 10.7.1
AngularFire: 17.0.0
Other (e.g. Ionic/Cordova, Node, browser, operating system): node: 18.18.0 OS: windows 11
How to reproduce these conditions
Failing test unit, Stackblitz demonstrating the problem
any repo
Steps to set up and reproduce
yarn
Sample data and security rules any
Debug output
Errors in the JavaScript console none
Output from
firebase.database().enableLogging(true);
noneScreenshots N/A
Expected behavior
successful compilation
Actual behavior
https://github.com/angular/angularfire/blob/master/src/package.json
says:but
https://github.com/angular/angularfire/blob/master/package.json
says