I have an angular 18 single-page web app that’s working locally, and I want to deploy it to firebase.
I set up a firebase account, and a project there.
Then: npm install -g firebase-tools
Then: ng add @angular/fire
This is where it gets confusing. I get:
% ng add @angular/fire
Skipping installation: Package already installed
UPDATE package.json (1137 bytes)
✔ Packages installed successfully.
? What features would you like to setup? (Press <space> to select, <a> to toggle
all, <i> to invert selection, and <enter> to proceed)
❯◯ Authentication
◯ Google Analytics
◯ App Check
◯ Firestore
◯ Realtime Database
◯ Cloud Functions (callable)
◯ Cloud Messaging
(Move up and down to reveal more choices)
and if I hit return (since I don’t need any of those things), I’m immediately back at the shell prompt. Nothing happens.
If I select “google analytics” and then hit return, it asks me to pick my firebase account (with a deprecation warning about “punycode), then “Please select a project”, which I do, then “Please select an app:”.
If I select the app I created via the firebase console, it completes with:
Downloading configuration data of your Firebase WEB app
UPDATE src/app/app.config.ts (2989 bytes)
But if anything happened on firebase I’m not seeing it. Am I just not looking in the right place?
If I select “[CREATE NEW APP]” instead and give it a name, it completes, but the new app doesn’t show up on firebase.
After doing all of the above I can try “ng deploy”, but even though “ng add @angular/fire” completed without giving me an error, I get this:
Cannot find "deploy" target for the specified project.
You can add a package that implements these capabilities.
For example:
Amazon S3: ng add @jefiozie/ngx-aws-deploy
Firebase: ng add @angular/fire
Netlify: ng add @netlify-builder/deploy
GitHub Pages: ng add angular-cli-ghpages
Would you like to add a package with "deploy" capabilities now? (Use arrow keys)
❯ No
Amazon S3
Firebase
Netlify
GitHub Pages
And from that point it’s the same as above. It returns to the prompt immediately if I don’t select any features from the list, and if I do it completes as described above.
What am I missing?