# React problem: No idea what I'm missing

**URL:** https://forum.codewithmosh.com/t/react-problem-no-idea-what-im-missing/18817
**Category:** React
**Created:** [March 15, 2023, 9:57pm UTC](https://forum.codewithmosh.com/t/react-problem-no-idea-what-im-missing/18817 "2023-03-15T21:57:37Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![DeadWorkerBee](https://avatars.discourse-cdn.com/v4/letter/d/5e9695/32.png) [@DeadWorkerBee](https://forum.codewithmosh.com/u/DeadWorkerBee)
#### Post date: [March 15, 2023, 9:57pm UTC](https://forum.codewithmosh.com/t/react-problem-no-idea-what-im-missing/18817/1 "2023-03-15T21:57:37Z")

</div>

While I can run the react app I get the blank web page. If I change the index.html to this:

```auto
<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <link rel="icon" type="image/svg+xml" href="/vite.svg" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Vitezzzzzzz + React + TS</title>
  </head>
  <body>
    <div id="root"></div>
    <script type="module" src="/src/main.tsx"></script>
  </body>
</html>

```

The zzzzz doesn’t appear. Also, the message doesn’t appear from Message.tsx.

---

<div class="post-metadata">

### Author: ![sufian.babri](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.codewithmosh.com/sufian.babri/32/1028_2.png) [@sufian.babri](https://forum.codewithmosh.com/u/sufian.babri)
#### Post date: [March 16, 2023, 2:46am UTC](https://forum.codewithmosh.com/t/react-problem-no-idea-what-im-missing/18817/2 "2023-03-16T02:46:48Z")

</div>

I think with Vite, you have to relaunch it whenever you make changes to index.html and sometimes major changes to you App.tsx.

So, try killing and then launching your Vite app again.

---

<div class="post-metadata">

### Author: ![DeadWorkerBee](https://avatars.discourse-cdn.com/v4/letter/d/5e9695/32.png) [@DeadWorkerBee](https://forum.codewithmosh.com/u/DeadWorkerBee)
#### Post date: [March 16, 2023, 10:52am UTC](https://forum.codewithmosh.com/t/react-problem-no-idea-what-im-missing/18817/3 "2023-03-16T10:52:38Z")

</div>

I’ll try that after I get back from work.

---

<div class="post-metadata">

### Author: ![DeadWorkerBee](https://avatars.discourse-cdn.com/v4/letter/d/5e9695/32.png) [@DeadWorkerBee](https://forum.codewithmosh.com/u/DeadWorkerBee)
#### Post date: [March 16, 2023, 11:43pm UTC](https://forum.codewithmosh.com/t/react-problem-no-idea-what-im-missing/18817/4 "2023-03-16T23:43:38Z")

</div>

I thought I killed it and restarted but this is what happens:

➜ Local: [http://localhost:5173/](http://localhost:5173/)  
➜ Network: use --host to expose  
➜ press h to show help  
N:\vite-project\src\App.tsx: Identifier ‘App’ has already been declared. (10:9)

8 | import Message from ‘./Message’;  
9 |

> 10 | function App() {  
> | ^  
> 11 | return
> 
> ;  
> 12 | }  
> 13 |  
> 7:41:41 PM [vite] Internal server error: N:\vite-project\src\App.tsx: Identifier ‘App’ has already been declared. (10:9)

8 | import Message from ‘./Message’;  
9 |

> 10 | function App() {  
> | ^  
> 11 | return
> 
> \</d (and more of the same)

---

<div class="post-metadata">

### Author: ![Nikola12](https://avatars.discourse-cdn.com/v4/letter/n/5f9b8f/32.png) [@Nikola12](https://forum.codewithmosh.com/u/Nikola12)
#### Post date: [March 17, 2023, 2:44pm UTC](https://forum.codewithmosh.com/t/react-problem-no-idea-what-im-missing/18817/5 "2023-03-17T14:44:27Z")

</div>

The error message indicates that the identifier “App” has already been declared. This usually means that there is another variable or function with the same name declared somewhere else in the same scope or file.

To fix this issue, you can check if there is another variable or function with the same name declared before the current declaration of “App” and either rename one of them or remove the duplicate declaration.

It is also possible that the import statement for the component “App” is being imported multiple times. In this case, you can ensure that the import statement for “App” is only included once in the file where it is used.
