Module not found: Error: Can't resolve 'animate.css' in '/opt/buildhome/repo/src'

When I am trying to deploy create-react-app using Cloudflare pages, I am always getting this error. When I try to run locally, the build is successful but I am facing this error on Cloudflare.

I removed that .css file but I got a similar error for another .css file - Module not found: Error: Can’t resolve ‘aos/dist/aos.css’ in ‘/opt/buildhome/repo/src/Components/About’

The .css files exists under node_modules in the respective paths as well

Can you share your repo or ideally a minimal way to reproduce this?