close

[Solved] You need to enable JavaScript to run this app in reactJS

Hello Guys, How are you all? Hope You all Are Fine. Today when I run npm run build command I am facing the following error You need to enable JavaScript to run this app in reactJS. So Here I am Explain to you all the possible solutions here.

Without wasting your time, Let’s start This Article to Solve This Error.

How You need to enable JavaScript to run this app in reactJS Error Occurs ?

Today when I run npm run build command I am facing the following error.

You need to enable JavaScript to run this app

How To Solve You need to enable JavaScript to run this app in reactJS Error ?

  1. How To Solve You need to enable JavaScript to run this app in reactJS Error?

    To Solve You need to enable JavaScript to run this app in reactJS Error Just add proxy inside the client package.json file. Here is 5000 is the port number and your port number should be different.

  2. You need to enable JavaScript to run this app in reactJS

    To Solve You need to enable JavaScript to run this app in reactJS Error Just add proxy inside the client package.json file. Here is 5000 is the port number and your port number should be different.

Solution 1

Just add or change in your package.json:

"homepage": "."

index.js:

app.use(express.static(__dirname)); //here is important thing - no static directory, because all static :)

app.get("/*", function(req, res) {
  res.sendFile(path.join(__dirname, "index.html"));
});

Solution 2

Just add proxy inside the client package.json file. Here is 5000 is the port number and your port number should be different.

"proxy": "http://localhost:5000"

Summery

It’s all About this issue. Hope all solution helped you a lot. Comment below Your thoughts and your queries. Also, Comment below which solution worked for you?

Also Read

Please Rate Our Solution to Motivate Us For Give Our Best

Leave a Comment