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
Links to this issue
Commits related to this issue
- reinstalling metro package Error: Cannot find module 'metro/src/DeltaBundler/Worker' https://github.com/facebook/metro/issues/293 — committed to VijayentKohli/CovidVaccineTracker by deleted user 3 years ago
@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.
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
metroand installingmetro-config. Not sure if it will work in everyone’s case.If you are using Yarn try this ❤️ yarn add --dev metro metro-core