You need to enable JavaScript to run this app – After deploying React App to firebase

After deploying React App to Firebase, In Network calls we will see 200 status code but in Response Preview, we will see the message as “You need to enable JavaScript to run this app” . I too faced this issue after deploying my React App to firebase.

In my case issue is with the BASE_URL. Go to your firabse settings and check the config details.

Cross-check with your network call base url with the config details like databaseURL, authDomain. If your network call BASE_URL is not matching with the config details, update your BASE_URL and then deploy the app again. I have fixed my issue by following these steps. If it is not fixing in your case, please follow the proper deployment guidelines.

You can deploy your React App to Firebase by using these instructions : https://learnersstore.com/2024/12/29/deploying-reactjs-app-to-firebase

Deploying ReactJS App to Firebase

Step 1: Install Firebase CLI globally

We can check the version by using the following command

Step 2: Login to the firebase account by using firebase CLI

If it is first time then we can navigate to login screen. If already logged in then it will show as “Already logged in “. If you want to login to other account or authenticate again we can use the following command.

firebase login --reauth

Step 3: Initialize firebase in your project’s root directory

firebase init

Then CLI will prompt the following questions.

After proceeding, it will show set of instructions. Navigate through them using Up/Down Arrow keys. Select Hosting by using spacebar.

Now select the project which you want to use. then it shows as “using project your_project_name”. After that you will see the following questions.

firebase.json code should be similar to the following. once check it in your project. if it is missing, rewrites key add it.

Step 4: Build your App using the following command

Step 5: Finally delpoy the App to firebase

TypeScript: Index signature for type ‘string’ is missing in type …

The error “Index signature for type ‘string’ is missing in type” occurs in TypeScript when we are trying to access a property using a dynamic string, but the object type doesn’t define an index signature to accommodate that.

For Example, The above Error will come in the following scenario

In the above example, typescript throws an error because key could be any string, but the Person type only explicitly defines name and age. To fix this we can add an index signature to the type as follows.

How to install specific MongoDB Version

Generally to install MongoDB we use the following command.

If you want to install specific version of mongodb, for example if you want install 3.4.0 version you can use the following command.

In the same way if we want to install any version of mongodb we can use this format.

Solution: zsh: command not found: mongod

If MongoDB is not installed properly in the system, then this error comes on command prompt. To fix this problem follow the below steps.

Try to install MongoDB by using Homebrew. Before that ensure Homebrew is installed or not by using the following command.

If Homebrew is not installed, install it. After completion of Homebrew installation, Add MongoDB to Homebrew’s list of packages by using the following command.

Install the latest version of MongoDB with the following command.

Now check with the command mongod in the command prompt. Now it won’t show the error message as command not found.