Javascript 反应本机项目创建不工作
面临在React Native(iOS)中创建项目的问题。我已成功安装以下命令:Javascript 反应本机项目创建不工作,javascript,ios,objective-c,iphone,react-native,Javascript,Ios,Objective C,Iphone,React Native,面临在React Native(iOS)中创建项目的问题。我已成功安装以下命令: 1. /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" 2. npm install -g react-native-cli 3. brew install node 4. brew install watchman 5. brew install flow
1. /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
2. npm install -g react-native-cli
3. brew install node
4. brew install watchman
5. brew install flow
当我运行命令“react native init AwesomeProject”时,它显示以下错误
-bash: react-native: command not found
仅供参考:在我的mac主目录中,它只创建一个文件名“npm debug.log”
我不能继续了
如何创建和运行项目
我的目录是:
您是否安装了sinopia?也许会有帮助。在安装
节点之前,您是否确实运行了npm install
?npm安装-g react native cli的输出是什么?@Evgeny Kuznetsov,否。伊斯克,我试过了。不管怎样,我通过重做“sudo npm install-g react native cli”命令解决了我的问题。现在很好用。