Firebase hosting deploy error “HTTP Error: 404, Not Found”

后端 未结 8 1594
无人及你
无人及你 2021-02-15 17:51

I don\'t know if this is related to the recent bump of firebase-tools to 6.0 or not. But I\'m unable to deploy my files to a hosting project.

The output after I type fi

相关标签:
8条回答
  • 2021-02-15 18:13

    make sure you choose a default storage location for your firebase project, then deploy again.

    here's how:

    in firebase project > project overview > gear icon > project settings > Default GCP resource location

    You can simply go to firebase console > storage > enable firebase storage.

    And It will resolve the issue.

    0 讨论(0)
  • 2021-02-15 18:14

    Changed the public directory reference. Deploy. It will give error. Changed it back to original. Serve then check. Deploy.

    0 讨论(0)
  • 2021-02-15 18:14

    The Only Problem to solve the problem was that the internet connection was not stable.As soon the internet connection was connected correctly so this is how I solved this.

    0 讨论(0)
  • 2021-02-15 18:15

    I had the same problem

    In my case I fixed it by adding on the firebase.json a dot before /dist on public tag "public": "./dist/my-app-name",

    Example of my json

    { "hosting": { "public": "./dist/my-app-name", "ignore": [ "firebase.json", "**/.*", "**/node_modules/**" ], "rewrites": [ { "source": "**", "destination": "/index.html" } ] } }

    0 讨论(0)
  • 2021-02-15 18:24

    I had a similar error while trying to follow the Starting with React Most Wanted codelab step "Prepare Firebase Databases"

    Error: HTTP Error: 404, Project 'react-most-wanted-ef689' does not exist.

    Where 'react-most-wanted-ef689' would contain the name of any project.

    It seems that I didn't set up Firestore properly. Missing step:

    Activate Firestore for the project and specify the Resource Location Id by following Get started with Cloud Firestore.

    I don't think it was in the codelab, so maybe this is something new since the codelab was written.

    0 讨论(0)
  • 2021-02-15 18:35

    I a similar issue and had to run the following to make it work

    npm install firebase-functions@latest firebase-admin@latest --save
    npm install -g firebase-tools
    

    See Get started: write and deploy your first functions for more details.

    0 讨论(0)
提交回复
热议问题