繁体   English   中英

无法在 Macbook air m1 2020 中运行新的 React Native 项目

[英]Not able to run new react native project in Macbook air m1 2020

嗨,我是 React Native 的新手,我在 VScode 中创建了一个新的 RN 项目。

这是信息

info Fetching system and libraries information...
(node:92233) Warning: Accessing non-existent property 'padLevels' of module exports inside circular dependency
(Use `node --trace-warnings ...` to show where the warning was created)
System:
    OS: macOS 12.2.1
    CPU: (8) arm64 Apple M1
    Memory: 86.44 MB / 16.00 GB
    Shell: 5.8 - /bin/zsh
  Binaries:
    Node: 14.18.0 - /opt/homebrew/opt/node@14/bin/node
    Yarn: 1.22.15 - /opt/homebrew/bin/yarn
    npm: 6.14.15 - /opt/homebrew/opt/node@14/bin/npm
    Watchman: Not Found
  Managers:
    CocoaPods: 1.11.2 - /opt/homebrew/bin/pod
  SDKs:
    iOS SDK:
      Platforms: DriverKit 21.2, iOS 15.2, macOS 12.1, tvOS 15.2, watchOS 8.3
    Android SDK:
      API Levels: 27, 28, 29, 30, 31, 32
      Build Tools: 28.0.3, 29.0.2, 30.0.2, 30.0.3, 31.0.0
      System Images: android-24 | ARM 64 v8a, android-31 | Google APIs ARM 64 v8a, android-31 | Google Play ARM 64 v8a
      Android NDK: Not Found
  IDEs:
    Android Studio: 2020.3 AI-203.7717.56.2031.7583922
    Xcode: 13.2.1/13C100 - /usr/bin/xcodebuild
  Languages:
    Java: 17.0.1 - /usr/bin/javac
  npmPackages:
    @react-native-community/cli: Not Found
    react: 17.0.2 => 17.0.2 
    react-native: 0.67.4 => 0.67.4 
    react-native-macos: Not Found
  npmGlobalPackages:
    *react-native*: Not Found

虽然其他人创建的其他项目运行良好,但新创建的却不是。

如果你仔细观察,你会发现:

守望者:未找到 Android NDK:未找到 @react-native-community/cli:未找到react-native :未找到

看起来您没有遵循 React Native 的推荐设置。 请go回头看看使用RN的前提条件。

另请注意,您的处理器存在一些问题,我不确定这些问题是否已经解决。 就我而言,我在 xcode 中排除了 arm64 并仅运行arch -x86_64 pod install

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM