Metro: Watchman / Metro Bundle cache don't update changes

Created on 19 Mar 2019  Â·  3Comments  Â·  Source: facebook/metro


This issue was originally created by @ger86 as facebook/react-native#22214.


## Environment
React Native Environment Info:
System:
OS: macOS 10.14
CPU: (8) x64 Intel(R) Core(TM) i5-8259U CPU @ 2.30GHz
Memory: 36.08 MB / 8.00 GB
Shell: 3.2.57 - /bin/bash
Binaries:
Node: 8.12.0 - /usr/local/bin/node
Yarn: 1.10.1 - /usr/local/bin/yarn
npm: 6.4.1 - /usr/local/bin/npm
Watchman: 4.9.0 - /usr/local/bin/watchman
SDKs:
iOS SDK:
Platforms: iOS 12.1, macOS 10.14, tvOS 12.1, watchOS 5.1
Android SDK:
API Levels: 26, 27
Build Tools: 26.0.3, 27.0.3, 28.0.3
System Images: android-25 | Google Play Intel x86 Atom, android-26 | Google APIs Intel x86 Atom_64, android-27 | Google APIs Intel x86 Atom
IDEs:
Android Studio: 3.2 AI-181.5540.7.32.5056338
Xcode: 10.1/10B61 - /usr/bin/xcodebuild
npmPackages:
react: 16.6.0 => 16.6.0
react-native: 0.57.4 => 0.57.4
npmGlobalPackages:
react-native-cli: 2.0.1

Description

Since React Native 0.57.4 when I am working with the iOS simulator, if I have an error importing a module (suppose I try to import ../A/someModule but someModule does not exists) I get the following error:

simulator screen shot - iphone 6 - 2018-11-08 at 17 01 44

But when I fixed it, watchman can't detect the change done in the source code and I have to:

  • reboot my computer
  • reinstall watchman package
  • remove node_modules folder

It is something weird but with a project with RC 57.1 doesn't happen to me...

I try with a clean installation of react-native and it starts to happen radomly.

Bug Report 📦Bundler

All 3 comments

, I just stop the terminal running Metro Bundler then [arrow up] to run this command to restart it
➜ myProject/node_modules/react-native/scripts/launchPackager.command ; exit;

then Cmd + R to restart the app!

In some cases, I has to reinstall the app :D
react-native run-ios --simulator='iPhone XS Max'!

Let us know when you find the best way to fix this issue!

Env:

  • MacOS, React Native: 0.58.6

Maybe some workarounds to clear cache partially exists?

any solutions ?

Was this page helpful?
0 / 5 - 0 ratings