0

I get an error while deploying my REACT App on Vercel, Netlify etc. It seems it is related to lottiefiles. Does it mean I cannot use lottiefiles in my React App?

Refer to the screenshot for details.

https://i.stack.imgur.com/2ml9q.jpg

I tried updating my NPM, and reinstalling react-lottie. But it didn't resolve the issue.

1 Answers1

0

At least on Netlify, you can solve this by adding a environment variable with the name NPM_FLAGS and the value as either --legacy-peer-deps or --force (whichever works for your setup).

As for why, you can refer to: https://stackoverflow.com/a/66035709/9579545

Hrishikesh Kokate
  • 1,065
  • 1
  • 8
  • 22