I will try to make sure this article is not very big and technical. I'll also try to make a detailed one in the future about firebase for development and firebase hosting. In this article, I just wanted to quickly share my experience with Firebase hosting. Today I had a website to be hosted somewhere. Good thing about that site was that, it was a static website. In the internet we have lots of options to host our static websites for free. In a matter of few minutes we will be able to host the static pages we build, along with index.html and make it available in the internet. I was able to host my site in less than a few minutes using firebase.
With that I wanted to explore firebase today. I have used firebase for the database purpose two years back when I was exploring a good database. I even managed to build a crud application with the help of Firebase Firestore. It was indeed a good experience. I will still recommend that because it was easy to use and coding was also very easy as there were neat documentations available online. The firebase team also does a good job in providing video tutorials making it easier for the developers as well as non developers to understand the concepts.
After almost like 1 year I hosted a website on firebase today. When I started off with Firebase CLI, I came up with an error message after I tried to login and initialize my project. I'm not going to go into the details of each and every step that I did. The documentations have detailed information on all that. I will just traverse through the error message and what I did to solve the error message. Below was the error message in the console.
Error: Failed to list Firebase projects. See firebase-debug.log for more info.
Initially that was the error message and I was confused as the information was not very straight forward. I was also not sure where to find the log file. I tried something and wanted to ask google about this issue. That is when I found a solution in one of the answers from StackOverflow.
The reason for the isssue was that there was caching issue with my login information and authorization. I had to logout and login again to be able to get the list of all my projects. That was pretty easy. After reauthorization, I was able to see the list of projects and continue with my hosting as well.
I would recommend using firebase hosting for deploying your static websites. One good reason to use firebase hosting is that it is free to use and another good reason to use firebase hosting is that it is a Google's product now.