This is now a problem I've been dealing with for a long long time and it has become an annoyance, so I would appreciate any kind of help.
I have been working on a react-native project with my team and everything was fine until I decided to relocate the project on my Mac and clone the repo from GitHub to my new location (I am not able to share the repo since it's private). Since then, when I run the npm run android / ios
I run into the following error:
Screenshot of the error screen
I am able to start the app on the emulator by running npx react-native start
and opening the app even after getting the error, so as I understand, it builds the app but fails to start it. However this means whenever I need a new build, I need to run a command, receive an error, run another command and open the app manually. Also, I am not able to create a build for my real iOS device at all.
I have tried deleting and reinstalling packages, clearing cache from watchman, react-native and metro bundler, reinstalling react-native-cli with --force
, basically I have tried every solution I could find on StackOverflow related to my problem. Here are some solutions I found:
React-Native Bundle Error error SHA-1 for file is not computed
How to remove error: bundling failed: ReferenceError: SHA-1 for file is not computed
react-native metro bundler error: bundling failed: ReferenceError: SHA-1 for file
Sadly, none of these worked for me. How can I solve this problem?
System:
- macOS 11.1
Binaries:
- Node: 14.15.3
- npm: 6.14.9
- Watchman: 4.9.0
npmPackages:
- @react-native-community/cli: Not Found
- react: 16.11.0
- react-native: 0.62.2
Thanks in advance.