I am trying to install the material icons package but I am facing the following error while installing npm ERR! While resolving: client@0.1.0 npm ERR! Found: react@18.0.0 in ReactJS. We are going to Learn about All Possible Solutions So Lets Get Start with This Article.
How npm ERR! While resolving: client@0.1.0 npm ERR! Found: react@18.0.0 Error Occurs?
I am trying to install the material icons package but I am facing the following error while installing.
npm ERR! While resolving: client@0.1.0 npm ERR! Found: react@18.0.0
So here I am writing all the possible solutions that I have tried to resolve this error.
How To Solve npm ERR! While resolving: client@0.1.0 npm ERR! Found: react@18.0.0 Error?
How To Solve npm ERR! While resolving: client@0.1.0 npm ERR! Found: react@18.0.0 Error?
To Solve npm ERR! While resolving: client@0.1.0 npm ERR! Found: react@18.0.0 Error If You are using React 18.0 then You might face this error. But in order to resolve this error you just need to install the package with –legacy-peer-deps command. Just put –legacy-peer-deps at the end of your command. Just like this: npm install @mui/material @emotion/react @emotion/styled –legacy-peer-deps Now, Your issue must be solved. Thank You.
npm ERR! While resolving: client@0.1.0 npm ERR! Found: react@18.0.0
To Solve npm ERR! While resolving: client@0.1.0 npm ERR! Found: react@18.0.0 Error If You are using React 18.0 then You might face this error. But in order to resolve this error you just need to install package force with –force command. Just put –force at the end of your command. Just like this: npm install @mui/material @emotion/react @emotion/styled –force Now, Your error must be solved. Thank You.
Solution 1: Install package with –force command
If You are using React 18.0 then You might face this error. But in order to resolve this error you just need to install package force with –force command. Just put –force at the end of your command. Just like this.
npm install @mui/material @emotion/react @emotion/styled --force
Now, Your error must be solved. Thank You.
Solution 2: Install package with –legacy-peer-deps command
If You are using React 18.0 then You might face this error. But in order to resolve this error you just need to install the package with –legacy-peer-deps command. Just put –legacy-peer-deps at the end of your command. Just like this.
npm install @mui/material @emotion/react @emotion/styled --legacy-peer-deps
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