close

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

Today We are Going To Solve You need to enable JavaScript to run this app in reactJS in reactjs. Here we will Discuss All Possible Solutions and How this error Occurs So let’s get started with this Article.

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

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

    To Fix You need to enable JavaScript to run this app in reactJS Error just Add proxy inside the client package.json file. To solve this error permanently you have to just add proxy inside the client package.json file. 5000 is my port number. May you should have different. So just try this method: "proxy": "http://localhost:5000"

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

    To Fix You need to enable JavaScript to run this app in reactJS Error just route must be appeared after all other routes. Here you have to make sure that the route must be appeared after all other routes. So just make sure by that and your error will be solved. app.get("/*", function (req, res) { res.sendFile(path.resolve(__dirname, '../client/build', 'index.html')); })

Solution 1 : Add proxy inside the client package.json file

To solve this error permanently you have to just add proxy inside the client package.json file. 5000 is my port number. May you should have different. So just try this method:

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

Solution 2 : route must be appeared after all other routes

Here you have to make sure that the route must be appeared after all other routes. So just make sure by that and your error will be solved.

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

Conclusion

So these were all possible solutions to this error. I hope your error has been solved by this article. In the comments, tell us which solution worked? If you liked our article, please share it on your social media and comment on your suggestions. Thank you.

Also Read This Solutions

Leave a Comment