简体   繁体   中英

Firebase Hosting only deploying 2 files

I'm trying to deploy my site to Firebase Hosting with the following commands (see below). It used to work fine, but after changing project folders today it would only deploy 1 file (see pic) and the site is not working. After running firebase init and choosing no to configure as a single-page-app (reqrite all urls to /index.html) , it is now deploying 2 files to Firebase hosting (and my public folder now has 2 files in it: index.html and 404.html). How can I return to deploying all 17 of my files to Firebase hosting again?

Commands I'm using:

ng build --prod

firebase init

firebase deploy

在此处输入图片说明

I finally got it to deploy after:

1) Running firebase init and setting public directory to dist

2) Running ng build --prod . This created a folder within the dist folder called 'hmn2' (my project name).

3) Copying all the contents within the hmn2 folder and pasting them one directory out, so they are directly under the dist folder. I also deleted the 'hmn' folder.

I'm not sure why it's putting them in another folder now (after upgrading to Angular 6). It didn't used to do this before.

I Had same issue with Ionic Just that below questions need to be answered correctly as below.

? What do you want to use as your public directory? www
? Configure as a single-page app (rewrite all urls to /index.html)? Yes
? File www/index.html already exists. Overwrite? No
i  Skipping write of www/index.html

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM