DEV Community

Cover image for Firebase Hosting Setup Complete Issue
ismailjosim
ismailjosim

Posted on

1

Firebase Hosting Setup Complete Issue

আপনার ফায়ারবেজ ওয়েবসাইট হোস্ট করার পরে যদি উপরের ইমেজের মতো ইস্যু দেখায় তাহলে নিচের স্টেপগুলো ফলো করেনঃ

১. প্রথমে কিছু ফাইল এবং ফোল্ডার ডিলিট করে দিবেনঃ .firebaserc, .firebase (folder), dist(folder), firebase.json
Image description

২. এরপরে firebase init কমান্ড দিয়ে নিচের স্টেপগুলো ফলো করেনঃ

1. `Are you ready to proceed? (Y/n)` 👉 Y

2. `কী-বোর্ডের down-arrow প্রেস করে **(Hosting: Configure files for Firebase Hosting and (optionally) set up GitHub Action deploys)** এরপরে স্পেস বাটনে ক্লিক করে সিলেক্ট করেন`
Enter fullscreen mode Exit fullscreen mode

Image description

  1. Use an existing project: আপনার React এ্যাপের জন্য যে প্রজেক্টটি ফায়ারবেজে বানিয়েছেন সেটা সিলেক্ট করেন

Image description

  1. What do you want to use as your public directory?👉 dist/build

এখানে আপনি যদি vite ব্যবহার করেন তাহলে আপনার build ফোল্ডারের নাম হবে dist আর যদি CRA অথবা yarn ব্যবহার করেন তাহলে আপনার build ফোল্ডারের নাম হবে build.

  1. Configure as a single-page app (rewrite all urls to /index.html)? (y/N) 👉 Y

  2. Set up automatic builds and deploys with GitHub? (y/N) 👉 N

  3. File build/index.html already exists. Overwrite?👉 Y

Image description

Image description

উপরে কমেন্টগুলো দেওয়ার পর আপনার প্রজেক্টে কয়েকটা ফাইল এবং ফোল্ডার এড হবে এবং আপনার টার্মিনালটা পরের কমান্ড দেওয়ার জন্য রেডি হবে।

৩। এই পর্যায়ে আপনার প্রজেক্টটা বিল করতে হবে তার জন্য npm run build দিয়ে Enter key প্রেস করেন।

Image description

৪। সর্বশেষে ফায়ারবেজে ডিপ্লয় করার জন্য firebase deploy কমান্ড দিয়ে Enter প্রেস করেন।

Image description

ডেপ্লয় শেষ হয়ে গেলে আপনাকে দুইটা লিংক প্রোভাইড করা হবে তার মধ্যে থেকে Hosting URL লিংকটা ওপেন করে চেক করেন।

যদি দেখেন একই দেখাচ্ছে তাহলে CTRL + SHIFT + R প্রেস করে আপনার ব্রাউজারের ট্যাব টাকে একটা হার্ড রিলোড দেন। সাধারণত উপরের প্রসেসটা ফলো করলে ফিক্স হয়ে যাবে। তবে মাঝেমধ্যে দুই থেকে পাঁচ মিনিটের মতো সময় নিতে পারে। এক্ষেত্রে দুই থেকে পাঁচ মিনিট অপেক্ষা করেন এর পরে আবার চেক করেন।

---------------------------- The End -----------------------------

Sentry blog image

How I fixed 20 seconds of lag for every user in just 20 minutes.

Our AI agent was running 10-20 seconds slower than it should, impacting both our own developers and our early adopters. See how I used Sentry Profiling to fix it in record time.

Read more

Top comments (0)

Billboard image

The Next Generation Developer Platform

Coherence is the first Platform-as-a-Service you can control. Unlike "black-box" platforms that are opinionated about the infra you can deploy, Coherence is powered by CNC, the open-source IaC framework, which offers limitless customization.

Learn more

👋 Kindness is contagious

Dive into an ocean of knowledge with this thought-provoking post, revered deeply within the supportive DEV Community. Developers of all levels are welcome to join and enhance our collective intelligence.

Saying a simple "thank you" can brighten someone's day. Share your gratitude in the comments below!

On DEV, sharing ideas eases our path and fortifies our community connections. Found this helpful? Sending a quick thanks to the author can be profoundly valued.

Okay