I had some cookies set in the same url (localhost:8080), probably from a previous development, and it was somehow messing with my React project. I only found out because (out of despair) I tried with another browser and it worked. I deleted the cookies and it worked perfectly.


Also a react newbie, I hit this issue. Remembering to add ReactDOM.render(<MyClassName />, document.getElementById("root")); fixed it for me.


In your react project folder install serve if you haven't installed it before;

npm install -g serve

Then serve your project with a static server;

serve -s build

The build is a folder generated by 'npm run build'.

That's it! Visit


by default.


If you are facing the error "You need to enable JavaScript to run this app." in reactjs then 9/10 times there is an issue with your API call. Please cross check API url string, parameters, action type, endpoints, action names, controller names and API call status. You'll be able to find the issue. verify endpoint url again and again. You'll definitely find a solutions. Also check ur VPN access if you're able to hit the end point.

Go to console --> network tab and see ur API status


after adding proxy in react package.json restart the reacr server. This works for me.


I had the same problem. In my case, the class name wasn't following the patterns (must starts with uppercase). As soon as I corrected it everything started to work well.


Go to your SignIn component or Register component, change the form tag to a div tag OR prevent the form default i.e (e.preventDefault). Also make sure that Javascript is enabled in your browser.


Just make sure that this route must be appeared after at all other routes

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


I received this error because an API call that I was making was being blocked because of an invalid API key.


Try to run in other browser and see if it is working.

If it works there then please try below things and refresh your website.

  1. Right click and select Inspect.
  2. Go to Application Tab.
  3. Clear everything from local storage, session storage and cookies.
  4. Refresh your website.

This resolved similar issue in my case and hope it will work for others.


I had same problem. My workable solution:


"homepage": "."


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"));


I received this message when no proxy to the server was specified inside client package.json file.

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

(where 5000 should be changed to whatever port number the server was setup to listen to. In my case it also required server restart once added)

Related Query

More Query from same tag