Packager starts then stops silently

Hello,

I’m trying to run my project with exp but the React Native packager fails silently each time I run `exp start --lan’.

I can see it running with ps -a | grep <packagerPid> right after I run the command but it stops after a few seconds. :frowning:

The output of `exp start --lan’ is

[exp] Starting React Native packager...
[exp] Scanning 529 folders for symlinks in <path>/node_modules (2ms)
[exp] Loading dependency graph.
[exp] Running packager on port 19001.
[exp] Expo is ready.
[exp] You can scan this QR code:

<Qr code>

[exp] Your URL is

exp://192.168.0.34:19000

[exp] Logs for your project will appear below. Press Ctrl+C to exit.

Does anybody have an explanation?

OS: Fedora 26
sdkVersion: 20.0.0

@ljed can you make sure exp is up to date? Also is your URL reachable? (ie) exp://192.168.0.34:19000

I’m using the latest version of exp and exp://192.168.0.34:19000 is reachable.

exp -V is 44.0.0.

The error I get on my device is

Could not connect to development server.

URL: http://192.168.0.34:19001/node_modules/expo/AppEntry.bundle?platform=ios&dev=true&strict=false&minify=false&hot=false&assetPlugin=expo/tools/hashAssetFiles

In Expo log, I also found

{
  "name":"expo",
  "hostname":"localhost.localdomain", 
  "pid":5399,
  "type":"project",
  "project":"<path>",
  "level":30,
  "tag":"packager",
  "msg": {
    "type":"initialize_packager_failed",
    "port":19001,
    "error": {
      "code":"ENOSPC",
      "errno":"ENOSPC",
      "syscall":"watch <path>/node_modules/react-native-maps/lib/android/lib/build/intermediates/exploded-aar/com.google.android.gms/play-services-base/8.4.0/res/values-ca",
      "filename":"<path>/node_modules/react-native-maps/lib/android/lib/build/intermediates/exploded-aar/com.google.android.gms/play-services-base/8.4.0/res/values-ca"
    }
  },
  "time":"2017-09-29T08:44:34.366Z",
  "v":0 
}

I finally solved it by running:

echo fs.inotify.max_user_watches=524288 | sudo tee -a /etc/sysctl.conf && sudo sysctl -p
1 Like

@ljed thanks a thousands time for ur precious post! It saved me actually!

Also helped me on Ubuntu 16.04. Thank you @ljed

This topic was automatically closed after 14 days. New replies are no longer allowed.