question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Error runnig `ng add @angular/fire`: "ENOENT: no such file or directory, open 'firebase.json'"

See original GitHub issue

Version info

Angular: 12.2.9

Firebase: 9.20.0

AngularFire: 7.1.0

Node: 16.8.0

npm: 8.0.0

How to reproduce these conditions

Steps to set up and reproduce

ng new angular-ssr-firebase --routing --style scss
cd .\angular-ssr-firebase\
ng add @angular/fire

Debug output

** Output from terminal **

PS C:\Users\alist\Git> ng new angular-ssr-firebase --routing --style scss
CREATE angular-ssr-firebase/angular.json (3291 bytes)
CREATE angular-ssr-firebase/package.json (1082 bytes)
CREATE angular-ssr-firebase/README.md (1064 bytes)
CREATE angular-ssr-firebase/tsconfig.json (783 bytes)
CREATE angular-ssr-firebase/.editorconfig (274 bytes)
CREATE angular-ssr-firebase/.gitignore (604 bytes)
CREATE angular-ssr-firebase/.browserslistrc (703 bytes)
CREATE angular-ssr-firebase/karma.conf.js (1437 bytes)
CREATE angular-ssr-firebase/tsconfig.app.json (287 bytes)
CREATE angular-ssr-firebase/tsconfig.spec.json (333 bytes)
CREATE angular-ssr-firebase/src/favicon.ico (948 bytes)
CREATE angular-ssr-firebase/src/index.html (304 bytes)
CREATE angular-ssr-firebase/src/main.ts (372 bytes)
CREATE angular-ssr-firebase/src/polyfills.ts (2820 bytes)
CREATE angular-ssr-firebase/src/styles.scss (80 bytes)
CREATE angular-ssr-firebase/src/test.ts (788 bytes)
CREATE angular-ssr-firebase/src/assets/.gitkeep (0 bytes)
CREATE angular-ssr-firebase/src/environments/environment.prod.ts (51 bytes)
CREATE angular-ssr-firebase/src/environments/environment.ts (658 bytes)
CREATE angular-ssr-firebase/src/app/app-routing.module.ts (245 bytes)
CREATE angular-ssr-firebase/src/app/app.module.ts (393 bytes)
CREATE angular-ssr-firebase/src/app/app.component.html (24617 bytes)
CREATE angular-ssr-firebase/src/app/app.component.spec.ts (1115 bytes)
CREATE angular-ssr-firebase/src/app/app.component.ts (225 bytes)
CREATE angular-ssr-firebase/src/app/app.component.scss (0 bytes)
✔ Packages installed successfully.
    Successfully initialized git.
PS C:\Users\alist\Git> cd .\angular-ssr-firebase\
PS C:\Users\alist\Git\angular-ssr-firebase> ng add @angular/fire
ℹ Using package manager: npm
✔ Found compatible package version: @angular/fire@7.1.0.
✔ Package information loaded.

The package @angular/fire@7.1.0 will be installed and executed.
Would you like to proceed? Yes
✔ Package successfully installed.
UPDATE package.json (1162 bytes)
✔ Packages installed successfully.
? What features would you like to setup? ng deploy -- hosting
Using firebase-tools version 9.20.0
ENOENT: no such file or directory, open '\C\Users\alist\Git\angular-ssr-firebase\firebase.json'

** Screenshots ** image

Expected behavior

Schematics running successfully

Actual behavior

Error creating firebase.json file.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:1
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
jamesdanielscommented, Oct 12, 2021

There’s been a flaky test in the windows contribute test suite, which means I haven’t been keeping as good an eye on this as I should. I’ll see if I can repro on my gaming machine. expect I’ll be able to track it down quickly.

1reaction
alisterlfcommented, Oct 12, 2021

I don’t know if helps, but i’m using Windows 11

Read more comments on GitHub >

github_iconTop Results From Across the Web

ENOENT: no such file or directory, open 'google/protobuf/api ...
This is an issue with AngularFirestoreModule. I have updated below line in package.json and it is working ...
Read more >
firebase-tools - npm
This command will create a firebase.json configuration file in your current directory. help, Display help information about the CLI or specific ...
Read more >
How to make Firebase App Check work when using Angularfire?
So managed to solve this by ditching AngularFireModule and using this instead: provideFirebaseApp(() => initializeApp(environment.firebase)),.
Read more >
Upgrading tips for Angular 10 projects - The NativeScript Blog
1. Update package.json · Using your preferred console app, after setting your working directory to your project path, run: node update_package.
Read more >
AngularFire - Firebase Open Source
ng add @angular/fire. AngularFire smooths over the rough edges an Angular developer might encounter when implementing the framework-agnostic Firebase JS SDK ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found