Xcode启动RN报错”`fsevents` unavailable”

目录
文章目录隐藏
  1. fsevents unavailable
  2. 全局安装 fsevents
  3. brew link 报错

fsevents unavailable

macOS fsevents unavailable (this watcher can only be used on Darwin)

安装文件监听

清除本地原有的 watchman
npm r -g watchman 
英特尔 MAC 安装
brew install watchman 
M1 芯片 安装
arch -arm64 brew install watchman

如果失败还可以使用如下命令

/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"

安装时又有如下错误

Error: Failure while executing; `tar --extract --no-same-owner --file /Users/xxxx/Library/Caches/Homebrew/downloads/f839b337f0ac1b367e2bdd72123940432a73834db77556858cefb671c2471aba--brotli-1.0.9.big_sur.bottle.tar.gz --directory /private/tmp/d20210623-7058-5w61ky` exited with 1. Here's the output:
tar: Error opening archive: Failed to open '/Users/xxxx/Library/Caches/Homebrew/downloads/f839b337f0ac1b367e2bdd72123940432a73834db77556858cefb671c2471aba--brotli-1.0.9.big_sur.bottle.tar.gz'

替换 homebrew-bottles

如果使用的 bash 终端
vim ~/.bash_profile
添加配置
export HOMEBREW_BOTTLE_DOMAIN=https://mirrors.ustc.edu.cn/homebrew-bottles
source ~/.bash_profile

#如果使用的是 zsh
vim ~/.zshrc
#添加配置
export HOMEBREW_BOTTLE_DOMAIN=https://mirrors.ustc.edu.cn/homebrew-bottles
source ~/.zshrc

#配置完重新执行 brew install watchman

clone Homebrew 失败

还有一种情况 brew install watchman 是 clone Homebrew 那个可以打开 GitHub 的Homebrew手动进入目录 clone 相关依赖包:

#找到自己本地相关的目录地址 进入
cd /usr/local/Homebrew/Library/Taps/homebrew
#clone 一下两个依赖包即可
git clone https://github.com/Homebrew/homebrew-cask
git clone https://github.com/Homebrew/homebrew-core.git

全局安装 fsevents

yarn global add fsevents

brew link 报错

An unexpected error occurred during the brew link step The formula built, but is not symlinked into /usr/local Permission denied @ dir_s_mkdir – /usr/local/Frameworks

变更文件权限:

sudo chown -R $(whoami):admin /usr/local/*

「点点赞赏,手留余香」

0

给作者打赏,鼓励TA抓紧创作!

微信微信 支付宝支付宝

还没有人赞赏,快来当第一个赞赏的人吧!

声明:本站所有文章,如无特殊说明或标注,均为本站原创发布。任何个人或组织,在未征得本站同意时,禁止复制、盗用、采集、发布本站内容到任何网站、书籍等各类媒体平台。如若本站内容侵犯了原著者的合法权益,可联系我们进行处理。
码云笔记 » Xcode启动RN报错”`fsevents` unavailable”

发表回复