brew安装守望者不工作

时间:2015-08-19 21:20:34

标签: facebook reactjs react-native watchman

brew install --HEAD watchman
==> Cloning https://github.com/facebook/watchman.git
Updating /Library/Caches/Homebrew/watchman--git
==> Checking out branch master
==> ./autogen.sh
==> ./configure --prefix=/usr/local/Cellar/watchman/HEAD --with-pcre
==> make
==> make install
install: chmod 777 /: Operation not permitted
touch //.not-empty
touch: //.not-empty: Permission denied
make[1]: *** [install-exec-local] Error 1
make: *** [install-am] Error 2
couldn't understand kern.osversion `14.5.0'

READ THIS: https://git.io/brew-troubleshooting

尝试chmod 777 /并不好。为什么要这样做呢?这样的感觉不应该被允许。我尝试卸载watchman并使用此命令重新安装以使反应本机开始工作。

此处按照以下步骤操作:https://github.com/facebook/react-native/issues/239

https://facebook.github.io/react-native/docs/troubleshooting.html

4 个答案:

答案 0 :(得分:5)

brew uninstall watchman
sudo chown -R `whoami` /usr/local
brew link pcre
brew install watchman

答案 1 :(得分:0)

尝试

brew update
brew doctor
brew install watchmen

如果您仍然遇到问题,请尝试访问your_project / node_modules / react-native / packager / react-packager / src / FileWatcher / index.js并增加MAX_WAIT_TIME

答案 2 :(得分:0)

修复在OSX上安装high sierra 10.13.2需要重新安装自制程序,因为它需要解决不可写的/usr/local/文件夹

我不得不重新安装自制软件:

卸载:

ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/uninstall)" 重新安装:

ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

答案 3 :(得分:0)

对我来说和上面一样:

brew update
brew doctor
brew install watchman

还要确保你在 jest 配置中有这个:

watchPathIgnorePatterns: ['node_modules']