File tree Expand file tree Collapse file tree 2 files changed +11
-1
lines changed
packages/metro-resolver-symlinks/src/utils Expand file tree Collapse file tree 2 files changed +11
-1
lines changed Original file line number Diff line number Diff line change 1+ ---
2+ " @rnx-kit/metro-resolver-symlinks " : patch
3+ ---
4+
5+ Fix experimental_retryResolvingFromDisk on metro 0.81
Original file line number Diff line number Diff line change @@ -165,7 +165,12 @@ export function patchMetro(options: Options): void {
165165 } catch ( e ) {
166166 // `ReferenceError` will always be thrown when Metro encounters a file
167167 // that does not exist in the Haste map.
168- if ( e instanceof ReferenceError ) {
168+ // In metro 0.81 (https://github.com/facebook/metro/pull/1435)
169+ // this was changed to a standard `Error` - so verify the message
170+ if (
171+ e instanceof ReferenceError ||
172+ ( e instanceof Error && e . message . startsWith ( "Failed to get the SHA-1" ) )
173+ ) {
169174 // Paths generated by pnpm setups include version numbers and/or hashes
170175 if ( filePath . includes ( ".pnpm-store" ) || filePath . includes ( ".store" ) ) {
171176 return filePath ;
You can’t perform that action at this time.
0 commit comments