Firebase deploy only deploys functions but not hosting?

Aspen

When I run firebase deploy, only my functions are deployed, but not my hosting.

=== Deploying to 'project1'...

i  deploying functions
i  functions: ensuring necessary APIs are enabled...
✔  functions: all necessary APIs are enabled
i  functions: preparing functions directory for uploading...
i  functions: packaged functions (36.04 KB) for uploading
✔  functions: functions folder uploaded successfully
i  functions: updating Node.js 6 function exampleFn1(us-central1)...
✔  functions[exampleFn1(us-central1)]: Successful update operation. 

✔  Deploy complete!

I thought it was an issue with build so ran yarn build, but hosting is still not being deployed.

On the Firebase console Hosting's release history section, it also shows latest deployment as January:

enter image description here

Any thoughts on why my React app is not being deployed? I've deployed it before and just made some front end and function changes.

(edit)

After running firebase init > hosting again which produced by firebase.json file, the deployment went through! But the deployed version is not the same version as yarn serve or even firebase serve serves up. Why is this?

=== Deploying to 'project1'...
i  deploying hosting
...
✔  Deploy complete!
Nipun Madan

I think you need to modify firebase.json files and then provide the correct hosting parameters for example:-

 "hosting": {
    **"public": "www",**
    "ignore": [
      "firebase.json",
      "**/.*",
      "**/node_modules/**"
    ],
    "rewrites": [
      {
        **"source": "**",
        "destination": "/index.html"**
      }
    ]
  }

Now change "public":"www" to "public":your dist folder name and then perform firebase deploy.

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

Firebase Hosting deploy only to sub directory

Firebase deploy only functions process

using "firebase deploy" to deploy to hosting - how does firebase know if it is deploying to hosting and not cloud functions?

Firebase functions: Deploy only newly added functions

firebase deploy --only functions overrides existing functions

firebase cloud functions command error `firebase deploy --only functions`

React Firebase Hosting deploys blank page

Undeploy functions in firebase hosting

Firebase hosting doesn't let me deploy bc firebase-functions is outdated

Disable Firebase hosting github deploy

Firebase Functions on Firebase Hosting: 404

firebase deploy only function not recognizing any of my functions

Deploy Only Single Non-exported Function in Firebase Cloud Functions

What's the reason for NPM Error on firebase deploy --only functions

firebase deploy --only hosting gives Error: HTTP Error: 410, Unknown Error

Nuxt ssr with firebase hosting and functions

Firebase hosting - force browser to reset cache on new deploys?

firebase functions fails to deploy

Firebase Functions Deploy Error

Cannot deploy functions to firebase

Unable to deploy functions in firebase

Firebase functions failed to deploy

Unable to deploy firebase functions

firebase deploy hosting from remote (google storage)

Deploy website on Firebase Hosting with specific path

Deploy Nuxt 3 website to Firebase Hosting

Firebase Hosting deploy gives HTTP Error 401

Firebase hosting deploy with serviceaccount fails with 403

Angular 6.0 firebase hosting deploy not working

TOP Ranking

HotTag

Archive