Create-react-native-app: Error starting package manager: `FSEventStreamStart: register_with_server: ERROR: f2d_register_rpc()`

Created on 14 Mar 2017  路  5Comments  路  Source: expo/create-react-native-app

OS: OSX 10.12.2
Node: 7.7.2 && 6.10.0 (I tried both)
Package manager: NPM 4 && 3, Yarn 0.21

Repro:

yarn global add create-react-native-app
create-react-native-app foo
cd ./foo && yarn start

Get this error:

$> ~/projects/_scratch/foo % yarn start
yarn start v0.21.3
$ react-native-scripts start
Starting packager...
***ERROR STARTING PACKAGER***
Starting React Native packager...
Scanning 777 folders for symlinks in /Users/tonyholdstock-brown/projects/_scratch/foo/node_modules (8ms)

Running packager on port 19002

Looking for JS files in
   /Users/tonyholdstock-brown/projects/_scratch/foo



React packager ready.



2017-03-14 09:10 node[68967] (FSEvents.framework) FSEventStreamStart: register_with_server: ERROR: f2d_register_rpc() => (null) (-22)

***ERROR STARTING PACKAGER***

2017-03-14 09:10 node[68967] (FSEvents.framework) FSEventStreamStart: register_with_server: ERROR: f2d_register_rpc() => (null) (-22)

***ERROR STARTING PACKAGER***

2017-03-14 09:10 node[68967] (FSEvents.framework) FSEventStreamStart: register_with_server: ERROR: f2d_register_rpc() => (null) (-22)

***ERROR STARTING PACKAGER***
 ERROR  Error watching file for changes: EMFILE


{"code":"EMFILE","errno":"EMFILE","syscall":"Error watching file for changes:","filename":null}

***ERROR STARTING PACKAGER***

Error: Error watching file for changes: EMFILE
    at exports._errnoException (util.js:1022:11)
    at FSEvent.FSWatcher._handle.onchange (fs.js:1406:11)

Most helpful comment

To summarize the above 3 comments:

# Remove any existing binaries
rm -rf /usr/local/var/run/watchman/
# Remove any npm globally installed instances
npm uninstall watchman
# Nuke the last brew installed version
brew uninstall watchman
# Brew install and build latest
brew install watchman

All 5 comments

I totally forgot about watchman... Normally running this inside my docker container which has it. Derp!

FYI, for anyone else: https://github.com/facebook/react-native/issues/910

For anyone else coming here, this was because I had installed a completely different watchman package via NPM globally. I uninstalled it and it was fixed.

@adamscybot that was the issue, i had to install watchman through brew and uninstall the npm watchman package.

To summarize the above 3 comments:

# Remove any existing binaries
rm -rf /usr/local/var/run/watchman/
# Remove any npm globally installed instances
npm uninstall watchman
# Nuke the last brew installed version
brew uninstall watchman
# Brew install and build latest
brew install watchman

I've done all of this twice now. It seems to work for about thirty seconds and then it says

Warning: You are using an old version of watchman (v4.5.0). This may cause problems for you.

We recommend that you either uninstall watchman (and XDE will try to use a copy it is bundled >with) or upgrade watchman to a newer version, at least v4.6.0.

If you are using homebrew, try:
brew uninstall watchman; brew install watchman

09:24:13: Warning: 'watchman' dependency is not installed.

If there is an issue running your project, please run npm install in >/Users/Ross/Documents/42/Twizznits/project and restart.

I've pretty much given up on this at this point

Was this page helpful?
0 / 5 - 0 ratings

Related issues

FezVrasta picture FezVrasta  路  3Comments

witbybit picture witbybit  路  4Comments

JackWReid picture JackWReid  路  4Comments

liyanxi picture liyanxi  路  3Comments

andyvanosdale picture andyvanosdale  路  3Comments