facebook / metro

🚇 The JavaScript bundler for React Native
https://metrobundler.dev
MIT License
5.23k stars 626 forks source link

Metro has encountered an error #1250

Open Alok19933 opened 7 months ago

Alok19933 commented 7 months ago

Description

Metro has encountered an error: Cannot read properties of undefined (reading 'transformFile'): /Users/Desktopnode_modules/react-native/node_modules/metro/src/Bundler.js (48:30)

46 | // TODO: Remove this ugly hack! 47 | await this._depGraphPromise;

48 | return this._transformer.transformFile(filePath, transformOptions); | ^ 49 | } 50 | } 51 |

RCTFatal __28-[RCTCxxBridge handleError:]_block_invoke _dispatch_call_block_and_release _dispatch_client_callout _dispatch_main_queue_drain _dispatch_main_queue_callback_4CF CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE __CFRunLoopRun CFRunLoopRunSpecific GSEventRunModal -[UIApplication _run] UIApplicationMain main start_sim 0x0 0x0

Getting this error when running the build, whereas the build is successfull, but when opening the app i am getting the above error.

Steps to reproduce

n/a

React Native Version

n/a

Affected Platforms

Runtime - iOS

Output of npx react-native info

n/a

Stacktrace or Logs

n/a

Reproducer

n/a

Screenshots and Videos

n/a

github-actions[bot] commented 7 months ago
:warning: Add or Reformat Version Info
:information_source: We could not find or parse the version number of React Native in your issue report. Please use the template, and report your version including major, minor, and patch numbers - e.g. 0.70.2
github-actions[bot] commented 7 months ago
:warning: Missing Reproducible Example
:information_source: We could not detect a reproducible example in your issue report. Please provide either:
  • If your bug is UI related: a Snack
  • If your bug is build/update related: use our Reproducer Template. A reproducer needs to be in a GitHub repository under your username.
pnthach95 commented 7 months ago

Please fill more information. This never happens if you use latest version