Mac os下:reactive 环境搭建

302 阅读1分钟

环境搭建

reactNative中文网

安装 homebrew

可能遇到失败

问题1:'macOS安装Homebrew时总是报错(Failed to connect to raw.githubusercontent.com port 443: Connection refused)'

  //修改:
  sudo vim /etc/hosts
  //添加:
  199.232.28.133 raw.githubusercontent.com
  /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"

brew 安装成功:

安装 Node 和 Watchman

brew install node
brew install watchman

创建新项目

npx react-native init AwesomeProject