Firebase Hosting Setup Complete Error Fix

Firebase Hosting Setup Complete Error Fix

code
Colin Stodd
Angular,Firebase,Errors
13 Jun 2018 (Published)
13 Jun 2018 (Updated)

I was just trying to post my AngularFire app to Firebase hosting and I was getting the “Firebase hosting setup complete” alert page. I couldn’t find the fix online, so I’ll post it here.

The Problem:

When you run ng build --prod, Angular now places the build files in dist/app-name/, but prior to ng6 it would place the build files in dist/. So when you’re uploading the files, Firebase ends up looking in the dist folder (probably where you’re used to setting your firebase init public folder).

The Fix:

Open up your angular.json file and change

"outputPath": "dist/your-app-name",

to

"outputPath": "dist",

Or:

You can re-run/setup your firebase init set your public directory option to "dist/your-app-name"

Either way you should now be able to run your firebase init setup as you normally would have in Angular 5–.