# Errors in React

**URL:** <https://forum.codewithmosh.com/t/errors-in-react/11758>\
**Category:** React\
**Created:** [April 6, 2022, 6:52am UTC](https://forum.codewithmosh.com/t/errors-in-react/11758 "2022-04-06T06:52:34Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Mojgan](https://avatars.discourse-cdn.com/v4/letter/m/ce7236/32.png) [@Mojgan](https://forum.codewithmosh.com/u/Mojgan)\
**Post date:** [April 6, 2022, 6:52am UTC](https://forum.codewithmosh.com/t/errors-in-react/11758/1 "2022-04-06T06:52:34Z")

</div>

Hi Everyone,

I am facing this error. could anyone help me to solve it?

Compiled with problems:X

ERROR in ./src/index.js 10:0-60

Module not found: Error: Can’t resolve ‘./registerServiceWorker’ in ‘C:\Users\Mojgan\counter-app\src’

---

<div class="post-metadata">

**Author:** ![eelsholz](https://avatars.discourse-cdn.com/v4/letter/e/439d5e/32.png) [@eelsholz](https://forum.codewithmosh.com/u/eelsholz)\
**Post date:** [April 7, 2022, 1:18am UTC](https://forum.codewithmosh.com/t/errors-in-react/11758/2 "2022-04-07T01:18:11Z")

</div>

Sounds like it’s looking for a file named `registerServiceWorker.js` in your `src` folder but can’t find it. That seems like the sort of thing the `create-react-app` tool would generate, and I don’t know why yours is missing. If you don’t have a need for the [React service worker](https://stackoverflow.com/questions/47953732/what-does-registerserviceworker-do-in-react-js#answer-47953810), you could probably just delete line 10 in your `index.js`, and any other lines in that file which refer to the service worker.

---

<div class="post-metadata">

**Author:** ![Mojgan](https://avatars.discourse-cdn.com/v4/letter/m/ce7236/32.png) [@Mojgan](https://forum.codewithmosh.com/u/Mojgan)\
**Post date:** [April 7, 2022, 6:59am UTC](https://forum.codewithmosh.com/t/errors-in-react/11758/3 "2022-04-07T06:59:08Z")

</div>

Thank you for your help. It solved after just removing it but I also had misstakes due writing uper-case and lower-case many places!

---

<div class="post-metadata">

**Author:** ![Mojgan](https://avatars.discourse-cdn.com/v4/letter/m/ce7236/32.png) [@Mojgan](https://forum.codewithmosh.com/u/Mojgan)\
**Post date:** [April 7, 2022, 7:00am UTC](https://forum.codewithmosh.com/t/errors-in-react/11758/4 "2022-04-07T07:00:14Z")

</div>

One more question , I am facing this error a lot:  
"WARNING in src\components\movies.jsx  
Line 2:8: ‘Like’ is defined but never used no-unused-vars

webpack 5.71.0 compiled with 1 warning in 679 ms"

Even, I have defined Like in my code!!!

---

<div class="post-metadata">

**Author:** ![eelsholz](https://avatars.discourse-cdn.com/v4/letter/e/439d5e/32.png) [@eelsholz](https://forum.codewithmosh.com/u/eelsholz)\
**Post date:** [April 7, 2022, 9:17pm UTC](https://forum.codewithmosh.com/t/errors-in-react/11758/5 "2022-04-07T21:17:18Z")

</div>

You defined `Like`, but it sounds like you’re not using it. Try removing it and see if everything still works and if the error goes away.

---

<div class="post-metadata">

**Author:** ![Mojgan](https://avatars.discourse-cdn.com/v4/letter/m/ce7236/32.png) [@Mojgan](https://forum.codewithmosh.com/u/Mojgan)\
**Post date:** [April 8, 2022, 5:39am UTC](https://forum.codewithmosh.com/t/errors-in-react/11758/6 "2022-04-08T05:39:30Z")

</div>

Thanks!

Still I am getting lots of errors 🥹

Compiled with problems:X

ERROR

src\components\moviestable.jsx  
Line 6:17: ‘movies’ is missing in props validation react/prop-types  
Line 6:25: ‘onDelete’ is missing in props validation react/prop-types  
Line 6:35: ‘onLike’ is missing in props validation react/prop-types  
Line 6:43: ‘onSort’ is missing in props validation react/prop-types  
Line 21:29: ‘movies.map’ is missing in props validation react/prop-types

Search for the keywords to learn more about each error.

---

<div class="post-metadata">

**Author:** ![eelsholz](https://avatars.discourse-cdn.com/v4/letter/e/439d5e/32.png) [@eelsholz](https://forum.codewithmosh.com/u/eelsholz)\
**Post date:** [April 9, 2022, 12:25am UTC](https://forum.codewithmosh.com/t/errors-in-react/11758/7 "2022-04-09T00:25:48Z")

</div>

This one is saying that you should add validation for the `movies`, `onDelete`, etc. props, as explained [here](https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/prop-types.md) and [here](https://stackoverflow.com/questions/38684925/react-eslint-error-missing-in-props-validation#answer-38685016). But, it can all be a bit confusing at first. If you don’t want to deal with these linting errors right now, you could disable the linting rule. For example in VS Code you can hover over the red squiggly and you’ll see the Quick Fix link which will give you some options for disabling the rule.

 ![quickfix](https://us1.discourse-cdn.com/flex020/uploads/codewithmosh/original/2X/4/4c5041ad51fc08e723ff53707435fbc1944ba03d.jpeg)
