码迷,mamicode.com
首页 > 其他好文 > 详细

React Native 开发环境安装和配置使用报错: -bash: react-native: command not found

时间:2016-09-27 18:03:15      阅读:264      评论:0      收藏:0      [点我收藏+]

标签:

[React  Native 开发环境安装和配置:-bash: react-native: command not found 报错:

 

前提是安装homebrew,node.js ,npm ,watchman,flow都成功。React  Native 开发环境安装和配置

执行react-native init TestProject 命令 创建demo时报错:-bash: react-native: command not found

报错提示:Please include the following file with any support request:  /Users/ewu/npm-debug.log,就是npm-debug.log这个文件有权限,

解决方法

加上sudo(root 权限)再执行命令:

sudo npm install -g react-native-cli

回车提示输入电脑密码,再回车,成功后再创建项目:

react-native init TestProject

--------------------------------- end ------------------------------------------------

终端打印日志表示正在创建:

This will walk you through creating a new React Native project in /Users/maple/Downloads/hellow/Hellotestddd

Installing react-native package from npm...

Setting up new React Native app in /Users/...........

 

React Native 开发环境安装和配置使用报错: -bash: react-native: command not found

标签:

原文地址:http://www.cnblogs.com/niexiaobo/p/5913608.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!