expo-cli icon indicating copy to clipboard operation
expo-cli copied to clipboard

File watching does not work, no file change detected

Open misog opened this issue 2 years ago • 0 comments

Summary

Hi. File change detection in Expo does not work when using Expo with Vagrant (virtualized OS with Libvirt and virtiofs file sharing in bidirectional mode).

Similarly, nodemon does not detect file changes with virtiofs, but nodemon has --legacy-watch flag which does work. Can be Expo configured to use legacy file detection or another file detection which works?

Alternatively, if the path to watched files could be specified in Expo (ex. expo start --watch-dir="/path/to/watch"), then one mount could be used for change detection (ex. rsync) and other mount can be used for file synchronization (virtiofs). Is it possible to specify it?

Thank you

Environment

Running virtualized with libvirt and virtiofs file sharing.

  expo-env-info 1.0.2 environment info:
    System:
      OS: Linux 5.4 Ubuntu 20.04.4 LTS (Focal Fossa)
      Shell: 5.0.17 - /bin/bash
    Binaries:
      Node: 16.14.2 - ~/.nvm/versions/node/v16.14.2/bin/node
      Yarn: 1.22.17 - /usr/bin/yarn
      npm: 8.5.0 - ~/.nvm/versions/node/v16.14.2/bin/npm
    npmPackages:
      expo: ~44.0.0 => 44.0.6 
      react: 17.0.1 => 17.0.1 
      react-dom: 17.0.1 => 17.0.1 
      react-native: 0.64.3 => 0.64.3 
      react-native-web: 0.17.1 => 0.17.1 
    npmGlobalPackages:
      expo-cli: 5.3.2
    Expo Workflow: managed

Please specify your device/emulator/simulator platform, model and version

-

Error output

No response

Reproducible demo or steps to reproduce from a blank project

Expected behavior:

  1. expo start
  2. Press w │ open web
  3. Modify and save App.js from HOST OS
  4. Expo should detect the file change

Actual behavior (bug):

  1. expo start
  2. Press w │ open web
  3. Modify and save App.js from HOST OS
  4. Expo does not detect the file change

Workaround behavior:

  1. expo start
  2. Press w │ open web
  3. Modify and save App.js from HOST OS
  4. touch App.js from GUEST OS
  5. Expo detects the file change

misog avatar Apr 21 '22 08:04 misog