0

I am currently working with Firebase using its hosting, functions, storage, database. After setting up all the firebase.json correctly, whenever I try to deploy those to the my project on firebase, this error keeps occuring.

firebase.json is in a good condition. I simply followed the instructions provided by firebase docs. I tried to uninstall and reinstall the 'firebase-tools' npm for my CLI. I have all checked the answers across the stackoverflow, but it seems that there is no correct answer.

firebase login
firebase list
firebase use 'myprojectid'
firebase deploy --only database, functions, storage, hosting

I expect it to work properly so that all things get deloyed. But I got this "socket hang up"error.

zkohi
  • 2,486
  • 1
  • 10
  • 20
Dream High
  • 123
  • 1
  • 10
  • Please post a bug report on the firebase-tools GitHub. Stack Overflow won't be of much help to you if there is a bug in the emulator. https://github.com/firebase/firebase-tools – Doug Stevenson May 16 '19 at 15:39

1 Answers1

0

I opened the issue on "firebase-tools" GitHub repo. Thanks to "thechenky", I caught the clue to solve this problem. The problem was ".firebaserc" settings. The configuration was not correct for my project as following:

{
  "projects": {
    "default": "gobot-a5af4",
    "dev": "gobot-a5af4",
    "prod": "gobot-3e82e",
    "mu": "gobot-multiuser"
  }
} 

So, whenever I deploy my functions, storage, database, and hosting, I unconsciously implied wrong projectID by "default". You can check the link: https://github.com/firebase/firebase-tools/issues/1309

Dream High
  • 123
  • 1
  • 10