FireBase not hosting index.html - firebase-hosting

So I have followed all the steps and I am sure my steps are correct but still firebase is not hosting my index.html. it is showing default index.html which doesn't even exists. I have only index.html under my root folder and no matter how many times I do 'firebase init', it says that the project is hosted but no json file or dist file or any other file is ever created.
firebase login
firebase init
your-build-command-here
firebase deploy
Tried all the above steps but didnt work. Need some help.

Put your html into a public/index.html directory
and type n when firebase asked you to override your index.html file
follow the steps given in below Url.
https://medium.com/#aleemuddin13/how-to-host-static-website-on-firebase-hosting-for-free-9de8917bebf2
you try these fixes as well.
Firebase not running index.html file

Related

Fiebase hosted url not working after deploying it again

I have update my already deployed flutter project and deployed it again in firebase . It shows the deployment is complete ,but my hosted url leads me to a firebase documentation page like below :
I intially typed:
firebase init
firebase deploy
The url was working fine when I deployed it for the first time . I
made some updation on my project and tried to deployed it again .What can I do now ?
this is my firebase.json:
I have solved the issue , I shouldn't have overwrite the index.html .Overwriting index.html will produce a default index.html which is created by firebase .So when they ask File build/web/index.html already exists. Overwrite? No should be given .
As I see your in image,it shows your build/web folder contains only 2 files in the folder. This is mostly happens if the deployment path incorrect.
Follow the steps to sovle the issue
Enter firebase init. After running this command it will show the parent folder path of your project as in the below image.
After that select Hosting: Configure files for Firebase Hosting and (optionally) set up GitHub Action deploys this future to host.
And then hit enter button
This will show you the public directory of your project as below
After that enter your public directory as build/web.
If you do all the above steps correctly while deploying the code, your build/web will contains around more than 70 files as the below image
I hope this will solve your issue

Deploying my website on firebase doesn't create .json file

This is the message I get when I go to view my website after completing hosting setup.
Welcome Firebase Hosting Setup Complete You're seeing this because
you've successfully setup Firebase Hosting. Now it's time to go build
something extraordinary!
I've done the following (per firebase support):
Run the command, firebase use to make sure the local config is pointed
to the correct Firebase project.
I've made sure that an index.html file is present.
However, I've not been able to do this (per firebase support):
I can't check the firebase.json file to make sure the public folder
(or public attribute) is the same as the location of your hosting
files.
It's because it looks like firebase init failed to create the firebase.json file as they are not in my root directory, so I'm suspecting this to be the problem.
I'm deploying from VS Code, please.
How can I get that file created? I am scheduled to launch this site tomorrow and I can't get any further responses from support (presumably it's cos of the weekend).
Many thanks for any help.

Flutter web located in a server folder

I have recently upload a flutter website inside of a folder in my server.
But it's not working well. I have notice that main.dart.js needs to have the folder name in the url. But It is not working well... What more things I have to change for running the website without more problems?
Try adding the base path to you're index.html.
Example:
<base href="/FolderName/">

How to remove "public" from the root directory access link?

i'am new to the hosting/c-panel stuff, and i got a laravel based app installed on my godaddy hosting, the problem is that the application require some files that are placed on the root directory of the server for example http://server.com/images/ajax-loader.gif and the file is placed just there
but when i type the link http://server.com/images/ajax-loader.gif it doesn't find it:
so i need to add a public like http://server.com/public/images/ajax-loader.gif like:
the problem is that the entire app needs to be modified to add a public for every file like that, so is there any way i can access the root folder without adding this /public/ ?
Have you contacted the hosting provider? Usually, they help with these kinds of issues.
Do other images from your 'images' directory load fine? If all images in the images directory do not load in the browser, that indicates either a permission issue or some .htaccess settings. Again needs to be checked at the hosting provider end.

Ionic Framework unable to change content src from index.html to index.php

I am new in Ionic Framework.
So via ionic cli i started a new app with blank template to run in android platform.
What i wanted to do is to replace the index.html with index.php in my app's folder that ionic cli automatically created for me.
So i moved into the www folder of my app i deleted the index.html file and instead i created an index.php file, then i moved into config.xml file and i changed the content src to points in the index.php file instead of index.html.
The problem is that i get this error in the browser:
Error: ENOENT: no such file or directory, open 'C:\Users\user\cmsApp\www\index.html'
and seems that my app still points to the default index.html (that doesn't exists anymore) instead the php one that i replaced with.
How can i fix that?
Thank you in advance!!!
You can try to modify the config file located here :
/PathOfYourProject/Config.xml
There is a part where you can change the source :
<content src="index.html"/>
But i'm not sure that you can place PHP file here.