close

How to solve ERR! Found: react@18.0.0 when Installing any type of package

I have Just Updated my React 17 to React 18 but As I updated It I am facing lots of issues one of them is Whenever I am trying to install any package I am facing npm ERR! code ERESOLVE npm ERR! ERESOLVE unable to resolve dependency tree npm ERR! npm ERR! While resolving: card@0.1.0 npm ERR! Found: react@18.0.0. So I have just Figured out a solution for this error Let’s start this article without wasting your time.

How to solve ERR! Found: react@18.0.0 when Installing any type of package

  1. How to solve ERR! Found: react@18.0.0 when Installing any type of package

    To solve ERR! Found: react@18.0.0 when Installing any type of package You just need to install package with –legacy-peer-deps command. Just put –legacy-peer-deps at the end of your command. For Example: npm install @mui/material @emotion/react @emotion/styled –legacy-peer-deps Whenever You are trying to install any packages Just add –force Or –legacy-peer-deps at the end of your command. Now, Your issue must be solved. Thank You.

  2. ERR! Found: react@18.0.0 when Installing any type of package

    To solve ERR! Found: react@18.0.0 when Installing any type of package You just need to install package with –legacy-peer-deps command. Just put –legacy-peer-deps at the end of your command. For Example: npm install @mui/material @emotion/react @emotion/styled –legacy-peer-deps Whenever You are trying to install any packages Just add –force Or –legacy-peer-deps at the end of your command. Now, Your issue must be solved. Thank You.

  3. ERR! Found: react@18.0.0

    To solve ERR! Found: react@18.0.0 when Installing any type of package You just need to install package force with –force command. Just put –force at the end of your command. For Example: npm install @mui/material @emotion/react @emotion/styled –force Whenever You are trying to install any packages Just add –force Or –legacy-peer-deps at the end of your command. Now, Your error must be solved. Thank You.

Solution 1: Install package with –force command

You just need to install package force with –force command. Just put –force at the end of your command. For Example.

npm install @mui/material @emotion/react @emotion/styled --force

Whenever You are trying to install any packages Just add –force Or –legacy-peer-deps at the end of your command. Now, Your error must be solved. Thank You.

Solution 2: Install package with –legacy-peer-deps command

You just need to install package with –legacy-peer-deps command. Just put –legacy-peer-deps at the end of your command. For Example.

npm install @mui/material @emotion/react @emotion/styled --legacy-peer-deps

Whenever You are trying to install any packages Just add –force Or –legacy-peer-deps at the end of your command. Now, Your issue must be solved. Thank You.

Summary

It’s all About this error. Hope We solved Your error. Comment below Your thoughts and your queries. Also, Comment below which solution worked for you?

Also, Read

Leave a Comment