During a fastlane build I get the following error:
error SHA-1 for file /Users/bobdevereux/src/windChime/Wind-Chime-Mobile/node_modules/metro-runtime/src/polyfills/require.js (/Users/bobdevereux/src/windChime/Wind-Chime-Mobile/node_modules/metro-runtime/src/polyfills/require.js) is not computed.
Potential causes:
1) You have symlinks in your project - watchman does not follow symlinks.
2) Check `blockList` in your metro.config.js and make sure it isn't excluding the file path.
ReferenceError: SHA-1 for file /Users/bobdevereux/src/windChime/Wind-Chime-Mobile/node_modules/metro-runtime/src/polyfills/require.js (/Users/bobdevereux/src/windChime/Wind-Chime-Mobile/node_modules/metro-runtime/src/polyfills/require.js) is not computed.
Potential causes:
1) You have symlinks in your project - watchman does not follow symlinks.
2) Check `blockList` in your metro.config.js and make sure it isn't excluding the file path.
at DependencyGraph.getSha1 (/Users/bobdevereux/src/windChime/Wind-Chime-Mobile/node_modules/metro/src/node-haste/DependencyGraph.js:217:13)
at Transformer._getSha1 (/Users/bobdevereux/src/windChime/Wind-Chime-Mobile/node_modules/metro/src/Bundler.js:26:26)
at Transformer.transformFile (/Users/bobdevereux/src/windChime/Wind-Chime-Mobile/node_modules/metro/src/DeltaBundler/Transformer.js:110:19)
at Bundler.transformFile (/Users/bobdevereux/src/windChime/Wind-Chime-Mobile/node_modules/metro/src/Bundler.js:60:30)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async Object.transform (/Users/bobdevereux/src/windChime/Wind-Chime-Mobile/node_modules/metro/src/lib/transformHelpers.js:147:12)
at async Graph._processModule (/Users/bobdevereux/src/windChime/Wind-Chime-Mobile/node_modules/metro/src/DeltaBundler/Graph.js:263:20)
at async Graph._traverseDependenciesForSingleFile (/Users/bobdevereux/src/windChime/Wind-Chime-Mobile/node_modules/metro/src/DeltaBundler/Graph.js:255:5)
at async Promise.all (index 0)
at async Graph.initialTraverseDependencies (/Users/bobdevereux/src/windChime/Wind-Chime-Mobile/node_modules/metro/src/DeltaBundler/Graph.js:239:5)
It’s reproducable with the following command:
/Users/bobdevereux/.nvm/versions/node/v20.15.0/bin/node /Users/bobdevereux/src/windChime/Wind-Chime-Mobile/node_modules/react-native/cli.js bundle --entry-file index.js --platform ios --dev false --reset-cache --bundle-output /Users/bobdevereux/Library/Developer/Xcode/DerivedData/wind_chime_mobile-dtwcfqsxojgnoofhmqmlihlokpwp/Build/Intermediates.noindex/ArchiveIntermediates/wind_chime_mobile/BuildProductsPath/Release-iphoneos/main.jsbundle --assets-dest /Users/bobdevereux/Library/Developer/Xcode/DerivedData/wind_chime_mobile-dtwcfqsxojgnoofhmqmlihlokpwp/Build/Intermediates.noindex/ArchiveIntermediates/wind_chime_mobile/BuildProductsPath/Release-iphoneos/WindChime.app --minify false
I have tried “npm i -g react-native-cli” and clearing node_modules and reinstalling, but neither solved the problem.
react-native info output:
System:
OS: macOS 14.5
CPU: (8) arm64 Apple M3
Memory: 83.00 MB / 16.00 GB
Shell:
version: "5.9"
path: /bin/zsh
Binaries:
Node:
version: 20.15.0
path: ~/.nvm/versions/node/v20.15.0/bin/node
Yarn:
version: 1.22.22
path: /usr/local/bin/yarn
npm:
version: 10.7.0
path: ~/.nvm/versions/node/v20.15.0/bin/npm
Watchman:
version: 2024.04.15.00
path: /opt/homebrew/bin/watchman
Managers:
CocoaPods:
version: 1.15.2
path: /Users/bobdevereux/.gem/bin/pod
SDKs:
iOS SDK:
Platforms:
- DriverKit 23.2
- iOS 17.2
- macOS 14.2
- tvOS 17.2
- visionOS 1.0
- watchOS 10.2
Android SDK: Not Found
IDEs:
Android Studio: 2023.2 AI-232.10300.40.2321.11567975
Xcode:
version: 15.2/15C500b
path: /usr/bin/xcodebuild
Languages:
Java:
version: 17.0.11
path: /opt/homebrew/opt/openjdk@17/bin/javac
Ruby:
version: 3.3.0
path: /opt/homebrew/opt/ruby/bin/ruby
npmPackages:
"@react-native-community/cli": Not Found
react:
installed: 18.2.0
wanted: 18.2.0
react-native:
installed: 0.72.14
wanted: 0.72.14
react-native-macos: Not Found
npmGlobalPackages:
"*react-native*": Not Found
Android:
hermesEnabled: true
newArchEnabled: false
iOS:
hermesEnabled: true
newArchEnabled: false