I am getting error in console “You need to enable JavaScript to run this app.” reactjs

前端 未结 8 506
北海茫月
北海茫月 2020-12-06 08:57

I am new to reactjs, I am working on a app. It was running fine, but when I\'ve run npm run build command, I am getting error "You need to enable JavaScript to run this

相关标签:
8条回答
  • 2020-12-06 09:32

    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.

    0 讨论(0)
  • 2020-12-06 09:34

    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)

    0 讨论(0)
  • 2020-12-06 09:35

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

    0 讨论(0)
  • 2020-12-06 09:36

    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.

    0 讨论(0)
  • 2020-12-06 09:40

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

    0 讨论(0)
  • 2020-12-06 09:48

    in chrome goto chrome://settings/content/javascript and enable javascript

    0 讨论(0)
提交回复
热议问题