-1

此处为实际图片:https ://drive.google.com/open?id=1avqikjxB6n2dnBNh9qZ0Yugk7kNki8wb

终端输出:

Microsoft Windows [Version 10.0.18362.720] (c) 2019 Microsoft Corporation. All rights reserved.

C:\Users\Khalid Babu\Desktop\ReactNative>npx react-native init firstApp
Error: EPERM: operation not permitted, mkdir 'C:\Users\Khalid'
command not found: react-native
...
4

1 回答 1

0

确保您已react-native-cli全局安装

npm install -g react-native-cli

react-native init AwesomeProject

此外,还有一些先决条件。请也检查一下。

  1. 下载并安装 JDK(v7 或更新版本)
  2. 下载并安装节点
  3. 下载并安装 Android Studio 使用 Java SDK 路径创建环境变量:

Windows → 搜索 → 系统 → 高级系统设置 → 环境变量 → 新建

JAVA_HOME: C:\path\to\JavaSDK

有关更多详细信息,请访问以下链接中提到的

https://shift.infinite.red/getting-started-with-react-native-development-on-windows-90d85a72ae65

于 2020-04-04T06:44:07.553 回答