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.
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).
Open up your angular.json
file and change
"outputPath": "dist/your-app-name",
to
"outputPath": "dist",
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–.