简体   繁体   中英

“could not connect to development server” error running React Native tutorial with Expo, suspecting Watchman

New to react native and mobile dev, running into this problem:

I am running the React Native hello world from the Facebook Website using Expo CLI as the build tool. What I did was to install Expo, run expo init test , install cocoapods, and cd into the test directory and run expo start .

When I open the app on iOS simulator or my iPhone, I get "Could not connect to development server" after about 3-5 minutes in white screen (see screenshot).

In the Expo logs. It is notable that upon every startup I get the following error logs:

2019-08-25T21:49:21,474: [cli] Failed to open /Users/nsadeh/Library/LaunchAgents/com.github.facebook.watchman.plist for write: Not a directory

ERROR
21:49
Watchman:  watchman --no-pretty get-sockname returned with exit code=null, signal=SIGABRT, stderr= 2019-08-25T21:49:21,474: [cli] Failed to open /Users/nsadeh/Library/LaunchAgents/com.github.facebook.watchman.plist for write: Not a directory

I have already tried un- and reinstalling Watchman as well as Expo. Not sure what else to do.

To reproduce:

  • macOS Mojave 10.14.6
  • node v10.16.3
  • expo 3.0.10
  • Watchman 4.9.0
  • react-native 0.59.10

Run expo init and from the top directory expo start . 在此处输入图片说明

Solution: turns out that postgreSQL left an unrelated LaunchAgents.plist file in my Library that was confusing Watchman. Renaming it resolved the issue.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM