metro: Error: Cannot find module 'metro/src/DeltaBundler/Worker'

When I run the react-native start I am getting this error message. I cleaned up all cache and removed node_modules/ these don’t work.

Can anyone help me, please?

My versions are.

react-native -v
react-native-cli: 1.2.0
react-native: 0.57.3

All code block as below;

react-native start --reset-cache
┌──────────────────────────────────────────────────────────────────────────────┐
│                                                                              │
│  Running Metro Bundler on port 8081.                                         │
│                                                                              │
│  Keep Metro running while developing on any JS projects. Feel free to        │
│  close this tab and run your own Metro instance if you prefer.               │
│                                                                              │
│  https://github.com/facebook/react-native                                    │
│                                                                              │
└──────────────────────────────────────────────────────────────────────────────┘

Looking for JS files in
   /Users/m/p/my-project

warning: the transform cache was reset.
Loading dependency graph, done.
Loading dependency graph...(node:26114) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): Error: Cannot find module 'metro/src/DeltaBundler/Worker'
(node:26114) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

About this issue

  • Original URL
  • State: open
  • Created 6 years ago
  • Reactions: 11
  • Comments: 18

Commits related to this issue

Most upvoted comments

@soranoba didn’t work for me either. @aafarian I think there’s an issue with the version of metro packaged with the latest RN Upgrade. I just installed locally in dev metro npm install --save-dev metro, which is the version 0.51.1, and that worked for me.

FYI: I also encountered the same issue, but I solved it.

rm -rf $TMPDIR/metro-cache*
watchman watch-del-all
react-native start --reset-cache

reinstalling metro solved my problem:

npm install --save-dev metro

@soranoba I’ve tried that, didn’t work for me

I got this error to go away by uninstalling metro and installing metro-config. Not sure if it will work in everyone’s case.

If you are using Yarn try this ❤️ yarn add --dev metro metro-core