Please attach react-native Official document Chinese version: http://wiki.jikexueyuan.com/project/react-native/getting-started.html
OK, let's take a look at the installation process.
The first is five needs
- OS x – Now this warehouse contains only IOS implementations, and Xcode can only run on Mac.
- Don't know Xcode? Download it from the Mac App Store.
- The recommended way to install Node,watchman,flow is Homebrew.
- brew install node。 Don't know node and NPM
- brew install --HEAD watchman。 We recommend installing Watchman, or you may encounter a node file with a bug.
- brew install flow。 If you want to use flow.
Download Xcode and don't say much.
The Brew Install node command was entered in terminal, prompting
-bash:brew:command not found
Indicates that my computer does not have homebrew (this is the official website http://brew.sh/index_zh-cn.html), we only need to enter the command
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
Then, wait for it. But to run the above command must use a VPN, do not forget oh.
Appear
==> Installation successful!
Indicates that the installation was successful. then enter the command
Brew Install node
Brew Install--head Watchman
Brew Install Flow
Success!
So here's the quick start, and I'm having a little problem here.
- npm install -g react-native-cli
- react-native init AwesomeProject
When I entered the first command, I made a mistake and appeared
NPM err! tar.unpack untar error/users/zhenghm/.npm/react-native-cli/0.1.7/package.tgz
Wait for a bunch of errors because the NPM folder operation requires system permissions, and the command is preceded by sudo.
Here is the end, have any questions please leave a message we discuss each other, thank you ~
React-native Installation and use