Just as the title says. I am tying to install an npm package and am running into an error. The specific package is called react-mic. I need to allow the user to record audio and show the wavelength pattern. Here is a picture of my logs and package.json. Hopefully the answer is simple and I am being dumb. Thank you for taking the time to help me out.
Asked
Active
Viewed 225 times
1 Answers
1
react-mic
depends on React version 16, but you have installed React version 18.
The first way
You can try to run the below command
npm install --legacy-peer-deps
Or
npm install --force
The second way
You can downgrade your React version to 16
npm uninstall react
npm install react@16.8.0

Nick Vu
- 14,512
- 4
- 21
- 31
-
Thank you this worked for me. Now I just need to work with this old as hell npm package lol. If you know of any other package that is more modern and can let users record audio let me know. – LAN_scape Oct 13 '22 at 03:31
-
1You're welcome!~ Unfortunately, I don't know any good replacement for this lib. You also can ask lib owners for the upgrade, or you can contribute to their lib :P – Nick Vu Oct 13 '22 at 03:33