Error during installation npm of react native navigation

when ever i install any npm in my project of react native it show an build failure when in restart metro for example i install this npm :"npm install @react-navigation/native ,npm install react-native-screens react-native-safe-area-context,npm install @react-navigation/native-stack"; and when i start my turminal again it show error :"

FAILURE: Build failed with an exception.

* What went wrong:

A problem occurred configuring project ':react-native-safe-area-context'.

\> Multiple build operations failed.

Could not read workspace metadata from C:\Users\kashi\.gradle\caches\transforms-4\1041b5df722d0b487085231ca71e2e55\metadata.bin

Could not read workspace metadata from C:\Users\kashi\.gradle\caches\transforms-4\4953abd08d17d74d9977bf741081a3db\metadata.bin

Could not read workspace metadata from C:\Users\kashi\.gradle\caches\transforms-4\1b2087d52d896999efbdf30b6a07309f\metadata.bin

Could not read workspace metadata from C:\Users\kashi\.gradle\caches\transforms-4\755b6d3ac773713c35ffb921f180fbc1\metadata.bin

\> Could not read workspace metadata from C:\Users\kashi\.gradle\caches\transforms-4\1041b5df722d0b487085231ca71e2e55\metadata.bin

\> Could not read workspace metadata from C:\Users\kashi\.gradle\caches\transforms-4\4953abd08d17d74d9977bf741081a3db\metadata.bin

\> Could not read workspace metadata from C:\Users\kashi\.gradle\caches\transforms-4\1b2087d52d896999efbdf30b6a07309f\metadata.bin

\> Could not read workspace metadata from C:\Users\kashi\.gradle\caches\transforms-4\777ea41c315b496039c86667ea042be5\metadata.bin

\> Could not read workspace metadata from C:\Users\kashi\.gradle\caches\transforms-4\755b6d3ac773713c35ffb921f180fbc1\metadata.bin

\> Run with --stacktrace option to get the stack trace.

\> Run with --info or --debug option to get more log output.

\> Run with --scan to get full insights.

\> Get more help at https://help.gradle.org.

BUILD FAILED in 10s

info Run CLI with --verbose flag for more details."; and when i uninstall them it work fine again mean it build successfully again why this error occur

1
Subscribe to my newsletter

Read articles from abhishek jaiswal directly inside your inbox. Subscribe to the newsletter, and don't miss out.

Written by

abhishek jaiswal
abhishek jaiswal