Watchman: Could not run application in react-native getting issue

Created on 24 Aug 2018  路  7Comments  路  Source: facebook/watchman

screen shot 2018-08-24 at 5 45 05 pm
Hi i am newbie in react-native development

Following things i have perform before build react-native application

  1. Install WebStorm
  2. Intsall NPM
  3. Install watchman
  4. Intsall react-native
  5. Update brew

When i am run the command i am getting following issue

Watchman: watchman --no-pretty get-sockname returned with exit code=1, signal=null, stderr= 2018-08-24T17:37:44,142: [0x7fffab20d380] while computing sockname: failed to create /usr/local/var/run/watchman/macbookpro-state: No such file or directory

I am also attaching the screenshot here , please take a look and guide me for proceed further

Help will be really appriciated

Thanks

Most helpful comment

Still no progress with installation using brew (even reinstalled Homebrew).

However this seems to work (it's based on watchman formula):

cd /usr/local/var/run
sudo mkdir watchman
sudo chmod 042777 watchman

The watchman version correctly returns the version now:

{
    "version": "4.9.0"
}

And it seems to hot reload code in React Native.

All 7 comments

Sounds like /usr/local/var/run/watchman/ doesn't exist. Setting that up is typically handled by the installation process. How did you install watchman? We recommend using brew for that. My suggestion is to uninstall watchman, update brew and then install watchman again, because from what you posted it sounds like you updated brew after installing, so you may have installed an older version of something.

Same issue here, sadly the installation using brew fails:

brew install watchman
==> Downloading https://homebrew.bintray.com/bottles/watchman-4.9.0.high_sierra.bottle.tar.gz
Already downloaded: /Users/twojcik/Library/Caches/Homebrew/watchman--4.9.0.high_sierra.bottle.tar.gz
==> Pouring watchman--4.9.0.high_sierra.bottle.tar.gz
Warning: The post-install step did not complete successfully
You can try again using `brew postinstall watchman

Tried brew uninstall watchman && brew update && brew install watchman - didn't help at all.

When running watchman version:

2018-08-29T15:02:08,530: [0x7fff9a86a380] while computing sockname: failed to create /usr/local/var/run/watchman/twojcik-state: No such file or directory

Still no progress with installation using brew (even reinstalled Homebrew).

However this seems to work (it's based on watchman formula):

cd /usr/local/var/run
sudo mkdir watchman
sudo chmod 042777 watchman

The watchman version correctly returns the version now:

{
    "version": "4.9.0"
}

And it seems to hot reload code in React Native.

From what you pasted, it sounds like there was something up with your system:

Warning: The post-install step did not complete successfully

My guess is a permissions problem blocking something. Now that you've manually created those dirs I wonder if you've unblocked it?

Since this wasn't a watchman problem and you're unblocked, I'm going to close this issue.

Well, the issue with dir access occured on 2nd day of using watchman and React Native (1st day was totally fine) so I'm not quite sure what could happen with my system after 1 day of work with mentioned tools.

So I guess this is a safe workaround to manually create watchman dir.

I am also having this issue. I'm using brew to install and it's not creating this directory for me in Mac OS X Catalina. I had to create it manually then I was able to install watchman 4.9.0.

I just had this exact issue. I tried everything from this comment and had the exact same experience. Watchman error followed by postinstall failure.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

cpojer picture cpojer  路  7Comments

ACoolmanBigHealth picture ACoolmanBigHealth  路  4Comments

artem-solovev picture artem-solovev  路  4Comments

yangzhichina picture yangzhichina  路  5Comments

fuechter picture fuechter  路  3Comments