【发布时间】:2017-04-12 06:05:41
【问题描述】:
我安装了react-native
我安装了nodejs
我设置路径
当我做sudo react-native init AwesomeProject
给我react-native: command not found
【问题讨论】:
我安装了react-native
我安装了nodejs
我设置路径
当我做sudo react-native init AwesomeProject
给我react-native: command not found
【问题讨论】:
您需要先运行npm install -g react-native-cli。
见http://facebook.github.io/react-native/docs/getting-started.html
【讨论】:
https://github.com/facebook/react-native/issues/3974
当我遇到同样的问题时,上述线程的对话解决了我的问题。 也许您需要手动添加路径。将 User/[your-user]/npm/bin 添加到 $PATH。
【讨论】: