我正在尝试让 React Native 在我的 Linux 机器上运行。为了让 cli 运行,我运行了:
$ yarn global add react-native-cli
看看:
yarn global v0.16.1
warning No license field
[1/4] Resolving packages...
[2/4] Fetching packages...
[3/4] Linking dependencies...
[4/4] Building fresh packages...
success Installed react-native-cli@1.0.0 with binaries:
- react-native
Done in 1.70s.
一切都安装得很好,但是当我尝试创建一个新的 React Native 项目时,我得到:
$ react-native init Test
react-native: command not found
来看看,yarn
是将依赖项安装到当前目录的任何位置,而不是全局安装。对此有什么帮助吗?我正在运行 Lubuntu 16.04。