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和重新安装与此命令,以获得一个react-native开始工作。
已执行以下步骤:https://github.com/facebook/react-native/issues/239
https://facebook.github.io/react-native/docs/troubleshooting.html
7条答案
按热度按时间bkkx9g8r1#
ijxebb2r2#
好的,修好了
你可以不使用--HEAD选项安装watchman(当前跟踪的watchman版本已经很老了,没有指定的问题)。
如果你的react项目出现问题,确保你的项目目录是git repo(如果不是,运行git init),请参见:
https://github.com/facebook/react-native/issues/2032
https://github.com/facebook/react-native/issues/2042
9w11ddsr3#
很抱歉,现在应该在https://github.com/facebook/watchman/commit/b35c6ed36a5f60ab3f214ddc646a8a03e03a0fee中修复
lf5gs5x24#
修复在OSX
high sierra 10.13.2
上安装需要重新安装homebrew,因为它需要解决不可写的/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)"
hgc7kmma5#
尝试
如果仍有问题,请尝试转到your_project/node_modules/react-native/packager/react-packager/src/FileWatcher/index.js并增加MAX_WAIT_TIME
dojqjjoe6#
对我来说,工作和上面一样:
还要确保在jest配置中包含以下内容:
rks48beu7#
使用新M1、M2 macbook的用户使用
arch -x86_64 brew install <package>