Getting "Unable to GET /" when trying to connect to localhost: 5000 Firebase

I'm trying to get my localhost server on Firebase to work, but I keep getting the following message in the "Can not GET /" browser. I looked in the console and all he says is ' http: // localhost: 5000/404 (Not Found)'.

I tried restarting the server using "firebase serve" and this does not help. I ran firebase init again, and that didn't help either. I installed firebase tools again by running "npm install -g firebase-tools" and then running firebase again and leaving nothing.

Not sure what is happening because it originally worked. I installed some grunt plugins and moved the index.html file under the html folder, although I still have the index.html file in the public folder in which it still says "Can not GET /"

I also tried restarting them in different browsers, etc.

I am using Mac OS X El Capitan.

Let me know if you need more information. thanks in advance

+5
source share
4 answers

I had a problem with firebase serve from the scripts directory in the "Friendly Chat" tutorial. Starting the server from the parent directory made it work again as expected.

+7
source

Well, it so happened that it works, but pretty much had to start from scratch. I deleted the shared folder and just moved the html, css, js and node-module folders from my project directory, then installed firebase-tools again and ran the firebase init command, then restarted the localhost server and everything started working again. After which I returned all my previous folders, and everything works as before.

Not sure if the problem occurred 100%, but at some point I deleted my index.html file and then returned it later when I tested something. At this moment, I feel that the problem has begun. I will try to test this script in a test project, but in my opinion, do not delete the index.html file yet, just modify the existing one. Thanks to everyone.

+1
source

An error message appears if you run "firebase serve" in the project folder.

Go to the parent folder (up one level) using "cd .." and start the server from there.

+1
source

if it helps someone save time. Perhaps: it is possible that the build step did not complete, it was my case, and there was no index.html in the build / ... directory

+1
source

Source: https://habr.com/ru/post/1259071/


All Articles