Search code examples
react-nativemetro-bundler

abort(TypeError: Cannot read property 'url' of undefined) React Native Metro Builder


I am getting the following error in metro builder after running the app.

RuntimeError: abort(TypeError: Cannot read property 'url' of undefined). Build with -s ASSERTIONS=1 for more info. at process.abort (/Users/.../node_modules/metro-hermes-compiler/src/emhermesc.js:796:13) at process.emit (node:events:365:28) at emit (node:internal/process/promises:136:22) at processPromiseRejections (node:internal/process/promises:242:25) at processTicksAndRejections (node:internal/process/task_queues:97:32) Process terminated. Press to close the window

I have tried the following:

  • Delete Podfile.lock
  • Delete node_modules
  • Clean xcode build folder
  • react-native start --reset-cache
  • watchman watch-del-all
  • pod update

Solution

  • I have the same issue. My problem was I tried to fix dependabot security issue of ws which I resolve it to newer version. And I have this issue.

    Now when I remove the resolution in package.json (I use yarn), it backs to work as usual now.