leecade / react-native-practice

8 stars 0 forks source link

react-native start failed without error output #21

Closed leecade closed 8 years ago

leecade commented 8 years ago
 # just block, without output
$ watchman version
# but, this command works 
$ watchman -v
4.6.0

temporary fixes:

node_modules/node-haste/lib/FileWatcher/index.js

execSync('watchman version', { stdio: 'ignore' });

to

execSync('watchman -v', { stdio: 'ignore' });
leecade commented 8 years ago

Some versions of macOS 10.12 cause the problem.

I noticed that if uninstall watchman, still got a error from node runtime like:

FSEventStreamStart: register_with_server: ERROR: f2d_register_rpc() => (null) (-22)

so, there may be open too many files than system-limit.

Tried to change it through unlimit and /Library/LaunchDaemons/limit.maxfiles.plist, but have no luck.

Finllay, resolved by:

$ launchctl unload ~/Library/LaunchAgents/com.github.facebook.watchman.plist
leecade commented 8 years ago

or:

$ rm -rf /usr/local/var/run/watchman/ && brew uninstall watchman && brew install watchman
brennanMKE commented 8 years ago

I fixed with problem by gathering a few tips from related issues. It seems macOS Sierra made several changes which prevents the previous workarounds from working. I wrote up what I did to make it work.

https://gist.github.com/brennanMKE/f6aa55b452ecda2f4c7a379e21647c88