【问题标题】:I want to create React Native App, but getting this error. What can I do?我想创建 React Native App,但收到此错误。我能做些什么?
【发布时间】:2020-04-04 06:05:50
【问题描述】:

此处为实际图片: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
...

【问题讨论】:

  • 你是想做一个 React 应用还是一个 React Native 应用?
  • 我怀疑有太多人会去打开一些随机的谷歌文档 - 你应该在你的问题中包含错误消息。
  • 错误是什么?我没看到。请在您的问题中以纯文本形式包含错误。
  • 我编辑了我的问题。请检查一下。我犯了一些错误。

标签: reactjs react-native react-native-android mkdir mkdirection


【解决方案1】:

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

npm install -g react-native-cli

react-native init AwesomeProject

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

  1. 下载并安装 JDK(v7 或更新版本)
  2. 下载并安装 Node
  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

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2019-09-08
    • 2021-06-08
    • 2020-05-12
    • 2021-11-28
    • 1970-01-01
    • 1970-01-01
    • 2020-05-28
    • 1970-01-01
    相关资源
    最近更新 更多