-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Unable to ng add @angular/fire on first try on Angular 12 in brand new app #2832
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
Comments
If someone is interested in reproducing the issue in Docker, you should be able to use this: # docker build -t firebase-test .
# docker run firebase-test
FROM node:14-alpine
WORKDIR /workspace
RUN npm i -g @angular/cli@latest
RUN ng new firebase --routing --style scss
WORKDIR /workspace/firebase
RUN ng add @angular/fire@next |
I made it work in a fresh nx workspace with angular cli v12 using my Windows Machine by running the following command:s - npm install @angular/[email protected]
- ng add @angular/[email protected] --verbose Also doing without the previous install, in other words, only _ _ ____ _ ___
/ \ _ __ __ _ _ _| | __ _ _ __ / ___| | |_ _|
/ △ \ | '_ \ / _` | | | | |/ _` | '__| | | | | | |
/ ___ \| | | | (_| | |_| | | (_| | | | |___| |___ | |
/_/ \_\_| |_|\__, |\__,_|_|\__,_|_| \____|_____|___|
|___/
Angular CLI: 12.0.0
Node: 12.14.0
Package Manager: npm 6.13.4
OS: win32 x64
Angular: 12.0.0
... animations, cli, common, compiler, compiler-cli, core, forms
... language-service, platform-browser, platform-browser-dynamic
... router
Package Version
---------------------------------------------------------
@angular-devkit/architect 0.1200.0
@angular-devkit/build-angular 12.0.0
@angular-devkit/core 12.0.0
@angular-devkit/schematics 12.0.0
@schematics/angular 12.0.0
rxjs 6.6.7
typescript 4.2.4 |
So I wasn't able to find a fix for this last night, it seems that the libraries installed in the prior schematic step ( In 6.1.5 I added a reasonable error message for this though: I'll keep digging in here & call in some assistance if I'm not able to find a solution with fresh eyes. |
Having your new error message being displayed on
ℹ Using package manager: npm
✔ Found compatible package version: @angular/[email protected].
✔ Package information loaded.
The package @angular/[email protected] will be installed and executed.
Would you like to proceed? Yes
✔ Package successfully installed.
UPDATE package.json (1891 bytes)
✔ Packages installed successfully.
The NodePackageInstallTask does not appear to have completed successfully or we ran into a race condition. Please run the `ng add @angular/fire` command again. |
@geromegrignon run ng add again and it should work, there's some sort of race condition after it npm installs that i haven't tracked down. |
Addressed in 7.1.0-rc.0 |
El mismo problema. No puedo instalar Firestore con Angular 16: The package @angular/[email protected] will be installed and executed. |
O mesmo problema. Não é possível instalar o Firestore com Angular 16: |
Works for me:
|
Version info
Angular: 12.0.0
Firebase:
@angular/fire
bundled versionAngularFire: 6.1.4 (latest at time of writing)
Other (e.g. Ionic/Cordova, Node, browser, operating system):
Node: v14.16.0
NPM: 6.14.13
OS: Windows 10 Pro, Windows 10 Enterprise, Mac (tested all 3)
Using regular Angular CLI
How to reproduce these conditions
Failing test unit, Stackblitz demonstrating the problem
N/A
Steps to set up and reproduce
npm i -g @angular/cli@latest
ng new firebasetest --routing --style scss
cd firebasetest
ng add @angular/fire@latest
ng add @angular/fire@latest
Sample data and security rules
N/A
Debug output
N/A
** Screenshots **
N/A
Expected behavior
@angular/fire
should be added on first run ofng add @angular/fire@latest
Actual behavior
Output from running all above commands (from Windows in this specific example)
The text was updated successfully, but these errors were encountered: