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

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.

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

How to run ionic build folder in window os private ip addr?

I hope someone can explain me how to achieve below goal, and whats the logic behind.
In my workplace, after complete code change, i will run build (ionic build web) to generate the build folder and paste it to server (a fixed location file path, eg: D:/project1/www). After paste the folder, i can access the app to verify my code change via private network (http://192.168.10.11:7000) thru google chrome browser. I believe there must be some configuration such as serving this www folder in this location to this network.
However i have no idea where is the configuration. Can anyone guide me thru this?
One scenario: Let's say i want to create one new app, a new build folder (project2) has created and i want to store new build folder in diff location (D:/project2/www) and serve at same private ip network with different port number (eg: 192.168.10.11:9000). How should i achieve this?

FireBase not hosting index.html

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

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.

how save file on server using HostingEnvironment.MapPath()

in this code iam trying to save text document on server / wwwroot folder. nothing happens :(!
if i am working on localhost and doing the same routine like this, everything works fine and i can save text document on local pc.:
If the same code works in your Dev machine and not working in Production, It should be folder Permission issue. I guess you have to change the folder permissions in server so that ASP.NET can write to that directory.
Checkout this link which explains how to do that.
Make sure you are not giving Write/Modify Permission to "Everyone"