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

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的https://github.com/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/*
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值