Error while resolving: react-lottie@1.2.3 Found: react@18.2.0


I am struggling with deploying the latest version of my site on Netlify due to using react-lottie@“^1.2.3”

This is the error message I receive

I tried to install npm i react-lottie --force as well as npm i react-lottie --legacy-peer-deps as the log suggests but no success. Do you know what I shall do?

Have a nice day!

Please refer to:

Thank you for the answer I fixed it at the end with a different solution, I used a lottie-player script instead and uninstalled the dependency.