Reputation: 9
I deploy the flutter web app into firebase as https://flutter-explained.dev/blog/flutter-web-to-firebase-hosting/ enter image description here
I met this when call deployed url "https://save-recipes.web.app" Will you let me know in detail how to solve this?
Upvotes: 0
Views: 59
Reputation: 303
flutter build web
sudo firebase init
firebase deploy
Is this the order you followed?
In firebase init
select Hosting: Configure files for Firebase Hosting and (optionally) set up GitHub Action deploys
> What do you want to use as your public directory? build/web
> Configure as a single-page app (rewrite all urls to /index.html)? Yes
> Set up automatic builds and deploys with GitHub? No
> File build/web/index.html already exists. Overwrite? No
Then you would get
> Skipping write of build/web/index.html
> Writing configuration info to firebase.json...
> Writing project information to .firebaserc...
> ✔ Firebase initialization complete!
Then run firebase deploy
=== Deploying to 'firebaseProjectName'...
and it would run the following
i deploying hosting
i hosting[firebaseProjectName]: beginning deploy...
i hosting[firebaseProjectName]: found 25 files in build/web
✔ hosting[firebaseProjectName]: file upload complete
i hosting[firebaseProjectName]: finalizing version...
✔ hosting[firebaseProjectName]: version finalized
i hosting[firebaseProjectName]: releasing new version...
✔ hosting[firebaseProjectName]: release complete
✔ Deploy complete!
Project Console: https://console.firebase.google.com/project/firebaseProjectName/overview
Hosting URL: https://firebaseProjectName.web.app
If it still doesn't work, try these following
firebase deploy --only hosting
or
firebase deploy --except functions
Let me know how it goes...
Upvotes: 0