facebook / create-react-app

Set up a modern web app by running one command.
https://create-react-app.dev
MIT License
102.54k stars 26.79k forks source link

You need to enable javascript to run this app react using yarn start #12174

Open grgsamrita opened 2 years ago

grgsamrita commented 2 years ago

I cloned an existing ReactJS app with version 16.12.0. I installed the app using yarn install and while running the app using yarn start. The app loads NoScript text You need to enable JavaScript to run this app..

How to solve this issue?

AustinGarrod commented 2 years ago

Is javascript enabled in your browser?

If you visit https://www.enable-javascript.com/ do you see Javascript is disabled in your web browser. If you enable JavaScript, this text will change or Javascript is enabled in your web browser. If you disable JavaScript, this text will change.

If you see Javascript is disabled in your web browser. If you enable JavaScript, this text will change, follow the instructions on the same page just below that message to enable javascript, and try your app again.

meenal21 commented 2 years ago

I have the same issue! But I already have Java is enabled in your web browser. What can I do to resolve this issue?

mselmank commented 1 year ago

Hello everybody, did you resolve this issue? I have this issue only on CRA.

nolany commented 1 year ago

Bump this. I am having the same problem. https://www.enable-javascript.com/ provided above shows me "Javascript is enabled in your web browser. If you disable JavaScript, this text will change."

nxcco commented 1 year ago

Same over here. Javascript is enabled but it still says I need to enable it. Any solutions to this yet?

leslie555 commented 1 year ago

Same issue here, I run my repo on mac successfully, but on windows, my API returns this info. The status code is 304 image

leslie555 commented 1 year ago

Same issue here, I run my repo on mac successfully, but on windows, my API returns this info. The status code is 304 image

I solved this issue. This is because I forgot to add the REACT_APP_ prefix to my environments in the .env file

DevelopMan commented 1 year ago

I had the same error when I used BrowserRouter instead of RouterProvider. This code didn't work:

const router = createBrowserRouter([{ path: "/", element: <div>Test page</div> }]);
const root = ReactDOM.createRoot(document.getElementById('root'));
root.render(  
  <React.StrictMode>    
    <BrowserRouter router={router} />
  </React.StrictMode>
);

this code did work:

const router = createBrowserRouter([{ path: "/", element: <div>Test page</div> }]);
const root = ReactDOM.createRoot(document.getElementById('root'));
root.render(  
  <React.StrictMode>    
    <RouterProvider router={router} />
  </React.StrictMode>
);
Emanlui commented 1 year ago

I got the same issue, this was resolved by deleting the tag

const root = ReactDOM.createRoot(document.getElementById('root'));
root.render(
     <BrowserRouter>
      <App />
    </BrowserRouter>
 );
idcooldi commented 1 year ago

I got the same issue, this was resolved by deleting the tag

const root = ReactDOM.createRoot(document.getElementById('root'));
root.render(
     <BrowserRouter>
      <App />
    </BrowserRouter>
 );

Please tell me how to give the status code here

RonaldWilson000 commented 1 year ago

What a great community. I still have not seen any help on this. I am stuck with the same issue.

arunchandra23 commented 12 months ago

Faced the same issue, when I tried to start my app it was starting at localhost:3000/my-repo-name, So tried changing the home route name to my repository name. It worked

rajeshtezu commented 9 months ago

Use gh-pages dev dependency and follow steps provided here it will work.

If after running npm run deploy it still does not work, go to Settings > Pages and change the branch to gh-pages and directory to /root

eddskt commented 7 months ago

i'm using gh-pages and nothing solve for me, bad

RyanMitchellWilson commented 5 months ago

I've tried every solution suggested and I'm still getting this issue. Has anyone been able to solve this yet?

bas-kirill commented 4 months ago

+1

nolany commented 4 months ago

Everyone make sure you are checking your React router setup. I cannot remember exactly what it was but it was related to using older, deprecated code in a newer version React. I apologize for not commenting on this immediately when I discovered this some time ago.

metacop commented 4 months ago

Everyone make sure you are checking your React router setup. I cannot remember exactly what it was but it was related to using older, deprecated code in a newer version React. I apologize for not commenting on this immediately when I discovered this some time ago.

I've been trying to solve this problem for over a week and I still can't do it.

nolany commented 4 months ago

I was able to find this today. It explains what my issue was at least. https://react.dev/blog/2022/03/08/react-18-upgrade-guide#updates-to-client-rendering-apis

bas-kirill commented 4 months ago

This template for Electron App works well: https://github.com/codesbiome/electron-react-webpack-typescript-2024