Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

"An unexpected error has occurred" after firebase deploy

When I am hosting my web page through firebase hosting then after writing command firebase deploy I got the following error:

Microsoft Windows [Version 10.0.14393]
(c) 2016 Microsoft Corporation. All rights reserved.

C:\Users\amarg\Desktop\amar>firebase init

     ######## #### ########  ######## ########     ###     ######  ########
     ##        ##  ##     ## ##       ##     ##  ##   ##  ##       ##
     ######    ##  ########  ######   ########  #########  ######  ######
     ##        ##  ##    ##  ##       ##     ## ##     ##       ## ##
     ##       #### ##     ## ######## ########  ##     ##  ######  ########

You're about to initialize a Firebase project in this directory:

  C:\Users\amarg\Desktop\amar

Before we get started, keep in mind:

  * You are initializing in an existing Firebase project directory

? Are you ready to proceed? Yes
? What Firebase CLI features do you want to setup for this folder? Hosting: Configure and deploy Firebase Hosting sites


=== Project Setup

First, let's associate this project directory with a Firebase project.
You can create multiple project aliases by running firebase use --add,
but for now we'll just set up a default project.

i  .firebaserc already has a default project, skipping

=== Hosting Setup

Your public directory is the folder (relative to your project directory) that
will contain Hosting assets to be uploaded with firebase deploy. If you
have a build process for your assets, use your build's output directory.

? What do you want to use as your public directory? public
? Configure as a single-page app (rewrite all urls to /index.html)? No
? File public/404.html already exists. Overwrite? No
i  Skipping write of public/404.html
? File public/index.html already exists. Overwrite? No
i  Skipping write of public/index.html

i  Writing configuration info to firebase.json...
i  Writing project information to .firebaserc...

+  Firebase initialization complete!

C:\Users\amarg\Desktop\amar>firebase deploy

=== Deploying to 'learningweb-6b2a3'...

i  deploying hosting
+  database: rules ready to deploy.
i  hosting: preparing public directory for upload...

Error: An unexpected error has occurred.

C:\Users\amarg\Desktop\amar>
like image 234
Amarjeet Kumar Avatar asked Feb 26 '17 23:02

Amarjeet Kumar


Video Answer


1 Answers

For me updating firebase-tools solved the issue

run below command in your cmd prompt

npm install -g firebase-tools

then try firebase init again

like image 123
Ravi arn Avatar answered Sep 22 '22 23:09

Ravi arn