M1安装reactNative踩坑

2022-02-19  本文已影响0人  懿轩加油

brew安装

转载链接[https://www.jianshu.com/p/06a9a59e7040 ]

报错

踩坑 Error: No similarly named formulae found

解决办法

cd /usr/local/Homebrew/Library/Taps/homebrew/
rm -rf homebrew-core
git clone https://github.com/Homebrew/homebrew-core.git

参考链接
[https://segmentfault.com/a/1190000040079396 ]

报错Unable to add a source with url

https://github.com/CocoaPods/Specs.git named master

1、cd ~/.cocoapods/repos
2、git clone https://github.com/CocoaPods/Specs.git master

参考链接
[https://blog.csdn.net/yqmfly/article/details/115025105 ]

New RN project in M1 mbp built failed. "Could not find node. Make sure it is in bash PATH or set the NODE_BINARY environment variable

sudo ln -s $(which node) /usr/local/bin/node

参考链接
[https://stackoverflow.com/questions/67337836/new-rn-project-in-m1-mbp-built-failed-could-not-find-node-make-sure-it-is-in ]

brew update 报错 "fatal: Could not resolve HEAD to a revision"

brew update --verbose

打开报错路径:
cd /opt/homebrew/Library/Taps/homebrew/homebrew-core
ls -al

然后再执行那个

git fetch --prune origin
git pull --rebase origin master

成功以后执行brew update
之后便可正常执行其他命令了brew install rbenv ruby-build

参考链接
[https://www.jianshu.com/p/b2de788c3c6d ]

You may have encountered a bug in the Ruby interpreter or extension libraries.

环境:M1芯片
问题:执行pod install 报错
参考链接[https://www.jianshu.com/p/56c48553de9e ]

后面持续完善...

上一篇下一篇

猜你喜欢

热点阅读