Believe me, I got the same problem. The problem is the path. React-native-reanimated takes the absolute path at compilation. It means, it is taking your path from the root directory like from start of C drive (if in windows) to the files in the node_modules. The maximum characters for path is 250 although in my case it was taking like 198 or something, it might have some restrictions for that.
I copied the entire project and pasted it in my users directory. The path was like
C:\users\<my-username>\<react-native-project>
This makes the path short and the resolves the error.